/* NV Driver Profiles — front end
 * Asphalt and paddock surfaces, NV green used only where it means something
 * (racing numbers, actions), and a printed timeslip for the headline figures.
 */

.nvdp {
	--nvdp-display: "Saira Condensed", "Arial Narrow", sans-serif;
	--nvdp-body: "Saira", system-ui, -apple-system, "Segoe UI", sans-serif;
	--nvdp-accent: #0aff2d;
	--nvdp-on-accent: #0d0f10;
	--nvdp-r-lg: 14px;
	--nvdp-r: 10px;
	--nvdp-r-sm: 6px;
	--nvdp-gap: clamp(14px, 2.4vw, 24px);

	font-family: var(--nvdp-body);
	font-size: 16px;
	line-height: 1.55;
	color: var(--nvdp-text);
	background: var(--nvdp-bg);
	border-radius: var(--nvdp-r-lg);
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;
	container-type: inline-size;
}
.nvdp [hidden] { display: none !important; }
.nvdp *, .nvdp *::before, .nvdp *::after { box-sizing: border-box; }

.nvdp--dark {
	--nvdp-bg: #1b1f23;
	--nvdp-surface: #23282d;
	--nvdp-surface-2: #2c3238;
	--nvdp-line: #3a4148;
	--nvdp-text: #eef1f3;
	--nvdp-muted: #9fa8b0;
	--nvdp-paper: #e9ecee;
	--nvdp-ink: #15181b;
	--nvdp-ink-muted: #5d666e;
	color-scheme: dark;
}
.nvdp--light {
	--nvdp-bg: #ffffff;
	--nvdp-surface: #f2f4f5;
	--nvdp-surface-2: #e8ebed;
	--nvdp-line: #d9dee2;
	--nvdp-text: #16191c;
	--nvdp-muted: #5a636c;
	--nvdp-paper: #1b1f23;
	--nvdp-ink: #eef1f3;
	--nvdp-ink-muted: #9fa8b0;
	color-scheme: light;
}

.nvdp a { color: inherit; }
.nvdp img { max-width: 100%; height: auto; display: block; }
.nvdp h1, .nvdp h2, .nvdp h3 { color: inherit; margin: 0; letter-spacing: 0; text-transform: none; }
.nvdp p { margin: 0; }
.nvdp dl, .nvdp dd, .nvdp ul { margin: 0; padding: 0; }
.nvdp :focus-visible { outline: 2px solid var(--nvdp-accent); outline-offset: 2px; border-radius: 4px; }
.nvdp .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* ---------- Shared pieces ---------- */

.nvdp-plate {
	position: absolute;
	left: 12px;
	top: 12px;
	min-width: 2.2em;
	padding: .05em .4em .1em;
	font-family: var(--nvdp-display);
	font-weight: 800;
	font-size: 1.5rem;
	line-height: 1;
	text-align: center;
	font-variant-numeric: tabular-nums;
	color: var(--nvdp-on-accent);
	background: var(--nvdp-accent);
	border-radius: 4px;
	transform: skewX(-9deg);
}
.nvdp-plate--sm { position: static; display: inline-block; font-size: .95rem; min-width: 1.9em; margin-right: .35em; vertical-align: .08em; }
.nvdp-plate--lg { font-size: 2.2rem; left: 16px; top: 16px; }
.nvdp-plate--xl { font-size: clamp(2.6rem, 7vw, 4.2rem); left: auto; right: 16px; top: auto; bottom: 16px; }

.nvdp-flag {
	position: absolute;
	right: 12px;
	top: 12px;
	font-size: .75rem;
	font-weight: 600;
	padding: .2em .6em;
	border-radius: var(--nvdp-r-sm);
	color: var(--nvdp-text);
	background: rgb(0 0 0 / .55);
	backdrop-filter: blur(4px);
}
.nvdp--light .nvdp-flag { color: #fff; }

.nvdp-tags {
	font-size: .85rem;
	font-weight: 500;
	color: var(--nvdp-muted);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5em;
}

.nvdp-status {
	font-size: .75rem;
	font-weight: 600;
	padding: .15em .55em;
	border-radius: var(--nvdp-r-sm);
	border: 1px solid var(--nvdp-line);
	color: var(--nvdp-text);
}
.nvdp-status--active::before {
	content: "";
	display: inline-block;
	width: .5em; height: .5em;
	margin-right: .4em;
	border-radius: 50%;
	background: var(--nvdp-accent);
	vertical-align: .08em;
}

.nvdp-photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.nvdp-photo--empty {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font-family: var(--nvdp-display);
	font-weight: 800;
	font-size: clamp(2.5rem, 8vw, 5rem);
	color: var(--nvdp-muted);
	background:
		repeating-linear-gradient(135deg, transparent 0 18px, rgb(255 255 255 / .03) 18px 36px),
		var(--nvdp-surface-2);
}

.nvdp-rows > div {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: .5rem 0;
	border-top: 1px solid var(--nvdp-line);
}
.nvdp-rows dt { color: var(--nvdp-muted); font-size: .875rem; flex: 0 1 auto; }
.nvdp-rows dd { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.nvdp-rows dd a { text-decoration: underline; text-underline-offset: 3px; }
.nvdp-unit { margin-left: .2em; color: var(--nvdp-muted); font-size: .85em; }

.nvdp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	padding: .7em 1.2em;
	font: 600 .95rem/1.2 var(--nvdp-body);
	color: var(--nvdp-on-accent) !important;
	background: var(--nvdp-accent);
	border: 0;
	border-radius: 8px;
	text-decoration: none !important;
	cursor: pointer;
}
.nvdp-btn:hover { filter: brightness(1.08); }
.nvdp-btn--ghost {
	color: var(--nvdp-text) !important;
	background: transparent;
	border: 1px solid var(--nvdp-line);
}
.nvdp-btn--ghost:hover { border-color: var(--nvdp-text); filter: none; }
.nvdp-link {
	font: inherit; color: var(--nvdp-text); background: none; border: 0; padding: 0;
	text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

.nvdp-icon { flex: none; }

/* ---------- Timeslip ---------- */

.nvdp-slip {
	position: relative;
	color: var(--nvdp-ink);
	background: var(--nvdp-paper);
	border-radius: 0 0 var(--nvdp-r-sm) var(--nvdp-r-sm);
	padding: 1.1rem 1.1rem .5rem;
	max-width: 30rem;
}
.nvdp-slip::before {
	/* perforated tear edge */
	content: "";
	position: absolute;
	left: 0; right: 0; top: -6px;
	height: 12px;
	background: radial-gradient(circle at 8px 6px, var(--nvdp-bg) 5px, transparent 5.5px) 0 0 / 16px 12px repeat-x;
}
.nvdp-slip__head {
	display: flex;
	justify-content: space-between;
	font-size: .8rem;
	font-weight: 600;
	color: var(--nvdp-ink-muted);
	padding-bottom: .5rem;
	border-bottom: 1px dashed currentColor;
}
.nvdp-slip__row {
	display: flex;
	align-items: baseline;
	gap: .6rem;
	padding: .45rem 0;
}
.nvdp-slip__row + .nvdp-slip__row { border-top: 1px dotted rgb(127 127 127 / .45); }
.nvdp-slip__row dt { flex: 1; font-size: .9rem; color: var(--nvdp-ink-muted); }
.nvdp-slip__row dd {
	font-family: var(--nvdp-display);
	font-weight: 700;
	font-size: 1.65rem;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.nvdp-slip__row dd small { font-family: var(--nvdp-body); font-size: .8rem; font-weight: 600; margin-left: .25em; color: var(--nvdp-ink-muted); }

/* ---------- Directory ---------- */

.nvdp-dir { padding: var(--nvdp-gap); }
.nvdp-dir__title { font: 700 clamp(1.8rem, 4vw, 2.6rem)/1 var(--nvdp-display); margin-bottom: 1.1rem !important; }

.nvdp-dir__bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; margin-bottom: 1rem; }
.nvdp-dir__bar > * { min-width: 0; }

.nvdp-search {
	display: flex;
	align-items: center;
	gap: .6rem;
	padding: 0 .9rem;
	background: var(--nvdp-surface);
	border: 1px solid var(--nvdp-line);
	border-radius: 8px;
	color: var(--nvdp-muted);
}
.nvdp-search:focus-within { border-color: var(--nvdp-accent); }
.nvdp-search input {
	flex: 1;
	min-width: 0;
	padding: .75rem 0;
	font: inherit;
	color: var(--nvdp-text);
	background: transparent;
	border: 0;
	outline: 0;
	box-shadow: none;
}
.nvdp-search input::placeholder { color: var(--nvdp-muted); }

.nvdp-chips {
	display: flex;
	gap: .5rem;
	margin: 0;
	padding: 0 0 2px;
	border: 0;
	overflow-x: auto;
	scrollbar-width: thin;
}
.nvdp-chips label { flex: none; cursor: pointer; position: relative; }
.nvdp-chips input { position: absolute; opacity: 0; pointer-events: none; }
.nvdp-chips span {
	display: block;
	padding: .45rem .9rem;
	font-size: .9rem;
	font-weight: 500;
	border: 1px solid var(--nvdp-line);
	border-radius: var(--nvdp-r-sm);
	white-space: nowrap;
}
.nvdp-chips input:checked + span { color: var(--nvdp-on-accent); background: var(--nvdp-accent); border-color: var(--nvdp-accent); }
.nvdp-chips input:focus-visible + span { outline: 2px solid var(--nvdp-accent); outline-offset: 2px; }

.nvdp-selects { display: flex; flex-wrap: wrap; gap: .75rem; }
.nvdp-select { display: grid; gap: .25rem; font-size: .8rem; color: var(--nvdp-muted); flex: 1 1 130px; max-width: 240px; }
.nvdp-select select {
	font: 500 .9rem var(--nvdp-body);
	color: var(--nvdp-text);
	background: var(--nvdp-surface);
	border: 1px solid var(--nvdp-line);
	border-radius: 8px;
	padding: .55rem .7rem;
	min-height: 0;
	width: 100%;
}

.nvdp-dir__count { font-size: .85rem; color: var(--nvdp-muted); margin-bottom: .9rem; }
.nvdp-dir__more { text-align: center; margin-top: var(--nvdp-gap); }
.nvdp-empty { color: var(--nvdp-muted); padding: 2rem 0; text-align: center; }

.nvdp-grid { display: grid; gap: var(--nvdp-gap); grid-template-columns: repeat(var(--nvdp-cols, 3), minmax(0, 1fr)); }
.nvdp-grid--1 { --nvdp-cols: 1; }
.nvdp-grid--2 { --nvdp-cols: 2; }
.nvdp-grid--3 { --nvdp-cols: 3; }
.nvdp-grid--4 { --nvdp-cols: 4; }
@container (max-width: 900px) { .nvdp-grid--4, .nvdp-grid--3 { --nvdp-cols: 2; } }
@container (max-width: 520px) {
	.nvdp-grid { --nvdp-cols: 1; }
	.nvdp-grid .nvdp-card__media { aspect-ratio: 4 / 3; }
	.nvdp-select { max-width: none; }
}

/* ---------- Card ---------- */

.nvdp-card {
	display: flex;
	flex-direction: column;
	background: var(--nvdp-surface);
	border: 1px solid var(--nvdp-line);
	border-radius: var(--nvdp-r);
	overflow: hidden;
}
.nvdp-card[hidden] { display: none; }
.nvdp-card:hover, .nvdp-card:focus-within { border-color: var(--nvdp-muted); }
.nvdp-card__media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--nvdp-surface-2); }
.nvdp-card__body { padding: 1rem 1.1rem 1.1rem; display: grid; gap: .35rem; }
.nvdp-card__name { font: 700 1.6rem/1.05 var(--nvdp-display); }
.nvdp-card__name a { text-decoration: none; }
.nvdp-card__name a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.nvdp-card { position: relative; }
.nvdp-card__nick { color: var(--nvdp-muted); font-style: italic; }
.nvdp-card .nvdp-rows { margin-top: .5rem; font-size: .925rem; }
.nvdp-card .nvdp-rows > div { display: grid; gap: 0; justify-content: stretch; padding: .45rem 0; }
.nvdp-card .nvdp-rows dt { font-size: .78rem; }
.nvdp-card .nvdp-rows dd { text-align: left; }
.nvdp-card .nvdp-rows a { position: relative; z-index: 1; }

/* ---------- Spotlight ---------- */

.nvdp-feature { padding: var(--nvdp-gap); margin: 1.5em 0; }
.nvdp-feature--compact { padding: calc(var(--nvdp-gap) * .7); }
.nvdp-feature__title { font: 700 clamp(1.5rem, 3.4vw, 2.1rem)/1.05 var(--nvdp-display); margin-bottom: 1rem; }
.nvdp-feature--spotlight .nvdp-feature__items { display: grid; gap: var(--nvdp-gap); }
.nvdp-feature--compact .nvdp-feature__items { display: grid; gap: .6rem; }

.nvdp-spot {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: clamp(18px, 3vw, 40px);
	align-items: center;
}
.nvdp-spot__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	border-radius: var(--nvdp-r);
	overflow: hidden;
	background: var(--nvdp-surface-2);
}
.nvdp-spot__body { display: grid; gap: .6rem; justify-items: start; }
.nvdp-spot__name { font: 800 clamp(2.2rem, 5.5vw, 3.6rem)/.95 var(--nvdp-display); }
.nvdp-spot__name a { text-decoration: none; }
.nvdp-spot__nick { font-size: 1.1rem; color: var(--nvdp-muted); font-style: italic; }
.nvdp-spot__tagline { max-width: 38ch; font-size: 1.05rem; }
.nvdp-spot .nvdp-slip { width: 100%; margin: .9rem 0 .4rem; }
@container (max-width: 640px) {
	.nvdp-spot { grid-template-columns: 1fr; }
	.nvdp-spot__media { aspect-ratio: 16 / 11; }
}

/* ---------- Compact ---------- */

.nvdp-compact {
	display: flex;
	align-items: center;
	gap: .9rem;
	padding: .6rem .9rem .6rem .6rem;
	background: var(--nvdp-surface);
	border: 1px solid var(--nvdp-line);
	border-radius: var(--nvdp-r);
	text-decoration: none !important;
}
.nvdp-compact:hover { border-color: var(--nvdp-muted); }
.nvdp-compact__media { flex: none; width: 56px; height: 56px; border-radius: var(--nvdp-r-sm); overflow: hidden; }
.nvdp-compact__media .nvdp-photo--empty { font-size: 1.2rem; }
.nvdp-compact__text { flex: 1; min-width: 0; display: grid; }
.nvdp-compact__name { font: 700 1.25rem/1.15 var(--nvdp-display); }
.nvdp-compact__sub { font-size: .875rem; color: var(--nvdp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nvdp-compact .nvdp-icon { color: var(--nvdp-muted); }

/* ---------- Profile ---------- */

.nvdp-profile { padding: clamp(14px, 3vw, 36px); margin: 0 0 2em; }

.nvdp-hero {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(20px, 4vw, 56px);
	align-items: end;
	padding-bottom: clamp(24px, 4vw, 48px);
	border-bottom: 1px solid var(--nvdp-line);
}
.nvdp-hero__media {
	position: relative;
	aspect-ratio: 4 / 5;
	border-radius: var(--nvdp-r);
	overflow: hidden;
	background: var(--nvdp-surface-2);
}
.nvdp-hero__body { display: grid; gap: .75rem; justify-items: start; }
.nvdp-back {
	display: inline-flex; align-items: center; gap: .4em;
	font-size: .9rem; color: var(--nvdp-muted) !important; text-decoration: none !important;
	margin-bottom: .5rem;
}
.nvdp-back:hover { color: var(--nvdp-text) !important; }
.nvdp-hero__name { font: 800 clamp(2.6rem, 7.5vw, 5.4rem)/.9 var(--nvdp-display) !important; }
.nvdp-hero__nick { font-size: 1.2rem; color: var(--nvdp-muted); font-style: italic; }
.nvdp-hero__tagline { font-size: 1.1rem; max-width: 42ch; }
.nvdp-hero .nvdp-slip { width: 100%; margin: 1rem 0 .25rem; }

.nvdp-socials { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.nvdp-socials a {
	display: inline-flex; align-items: center; gap: .45em;
	padding: .45rem .8rem;
	font-size: .875rem; font-weight: 500;
	border: 1px solid var(--nvdp-line);
	border-radius: 8px;
	text-decoration: none !important;
}
.nvdp-socials a:hover { border-color: var(--nvdp-text); }
.nvdp-socials .nvdp-icon { width: 18px; height: 18px; }

.nvdp-profile__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
	gap: clamp(24px, 4vw, 56px);
	padding-top: clamp(24px, 4vw, 48px);
}
.nvdp-profile__main { display: grid; gap: clamp(28px, 4vw, 44px); align-content: start; }
.nvdp-block__title { font: 700 clamp(1.5rem, 3vw, 2rem)/1.05 var(--nvdp-display); margin-bottom: .8rem; }
.nvdp-block__body { max-width: 68ch; }
.nvdp-block__body p + p { margin-top: 1em; }
.nvdp-block--gallery .nvdp-block__body, .nvdp-block--video .nvdp-block__body, .nvdp-block--image .nvdp-block__body { max-width: none; }
.nvdp-block--content .nvdp-block__body { font-size: 1.05rem; }

.nvdp-list { list-style: none; display: grid; }
.nvdp-list li { padding: .55rem 0 .55rem 1.4rem; border-top: 1px solid var(--nvdp-line); position: relative; }
.nvdp-list li::before {
	content: "";
	position: absolute; left: 0; top: 1.05rem;
	width: .6rem; height: 2px;
	background: var(--nvdp-accent);
}

.nvdp-field-image { border-radius: var(--nvdp-r); width: 100%; }

.nvdp-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nvdp-gallery__item { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--nvdp-r-sm); }
.nvdp-gallery__item img { width: 100%; height: 100%; object-fit: cover; }
@container (max-width: 480px) { .nvdp-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.nvdp-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--nvdp-r); overflow: hidden; background: #000; }
.nvdp-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.nvdp-profile__aside { display: grid; gap: 1rem; align-content: start; }
.nvdp-spec {
	padding: 1rem 1.1rem .4rem;
	background: var(--nvdp-surface);
	border-radius: var(--nvdp-r);
}
.nvdp-spec__title { font: 700 1.25rem/1.1 var(--nvdp-display); margin-bottom: .5rem; }
.nvdp-spec .nvdp-rows > div:first-child { border-top: 0; }

.nvdp-events { padding-top: clamp(28px, 4vw, 48px); margin-top: clamp(28px, 4vw, 48px); border-top: 1px solid var(--nvdp-line); }
.nvdp-events__list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--nvdp-gap); }
.nvdp-events__list a { display: grid; gap: .35rem; text-decoration: none !important; }
.nvdp-events__list img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--nvdp-r-sm); width: 100%; margin-bottom: .3rem; }
.nvdp-events__date { font-size: .8rem; color: var(--nvdp-muted); }
.nvdp-events__title { font-weight: 600; line-height: 1.3; }
.nvdp-events__list a:hover .nvdp-events__title { text-decoration: underline; text-underline-offset: 3px; }

@container (max-width: 820px) {
	.nvdp-hero { grid-template-columns: 1fr; align-items: start; }
	.nvdp-hero__media { aspect-ratio: 4 / 3; }
	.nvdp-profile__layout { grid-template-columns: 1fr; }
}
@container (max-width: 460px) {
	.nvdp-hero__media { aspect-ratio: 1; }
	.nvdp-slip__row dd { font-size: 1.45rem; }
}

/* The one orchestrated moment: the timeslip prints out on profile load. */
@media (prefers-reduced-motion: no-preference) {
	.nvdp-profile .nvdp-slip { animation: nvdp-print .9s steps(9, end) .2s both; }
	@keyframes nvdp-print {
		from { clip-path: inset(0 0 100% 0); }
		to { clip-path: inset(-12px 0 0 0); }
	}
}

.nvdp-notice { padding: .8em 1em; border: 1px dashed #c00; color: #a00; font-size: .9rem; }
