/* ---------- Tokens ---------- */
:root {
	--primary-color: #1f3c88;
	--primary-color-border: #172d66;
	--primary-color-light: #2d54b8;
	--secondary-color: #e4e8f2;
	--text-color: #18213a;
	--text-color-secondary: rgba(24, 33, 58, 0.66);
	--background-color: #f4f6fb;
	--background-color-dark: #e6eaf4;
	--secondary-background-color: #ffffff;
	--card-border: #dfe4ef;
	--shadow-main: rgb(24 33 58 / 7%);
	--green-color: #008000;
	--red-color: #ff0000;
	--cta-color: #ff5b24;
	--cta-color-hover: #e64a1a;
	/* navy header, hero and footer; amber accent */
	--ink: #0f1d45;
	--ink-2: #1a2d66;
	--accent: #f6b40e;
	--accent-hover: #e0a200;
	--accent-text: #9a6b00;
}

@font-face {
	font-family: 'Roboto Mono';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/fonts/roboto-mono-400.woff2') format('woff2');
}

/* ---------- Base ---------- */
* {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	color: var(--text-color);
	background-color: var(--background-color);
}

a {
	color: var(--primary-color);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 1rem;
	text-wrap: balance; /* even line lengths in headings */
}

p,
li,
dd {
	text-wrap: pretty; /* no single orphaned word on the last line */
}

button {
	font-family: inherit;
}

[hidden] {
	display: none !important;
}

.layout {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

main {
	margin: 1rem;
	flex: 1;
	min-height: 0;
}

/* ---------- Header ---------- */
.site-header {
	background-color: var(--ink);
	color: #fff;
	position: relative;
	z-index: 1001;
}

.site-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.85rem 1rem;
	max-width: 1200px;
	margin: 0 auto;
}

.site-nav .lang-button {
	color: #fff;
}

.site-header .burger {
	color: #fff; /* the × while the menu is open */
}

.site-header .burger span {
	background-color: #fff;
}

/* The side menu sits inside the header but on a light panel */
.site-header .menu {
	color: var(--text-color);
}

.nav-left {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
	gap: 0.5rem;
	align-items: center;
}

.nav-right {
	display: flex;
	flex: 0 0 auto;
	gap: 1rem;
	align-items: center;
}

.logo {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	flex: 0 0 auto;
	margin-right: 0.75rem;
	color: #fff;
	font-weight: 700;
	font-size: 1.2rem;
	letter-spacing: -0.01em;
	line-height: 1;
}

.logo:hover {
	text-decoration: none;
}

.logo-mark {
	width: 2rem;
	height: 2rem;
	flex-shrink: 0;
}

.logo small {
	font-size: 1em;
	font-weight: 700;
	color: var(--accent);
}

/* ---------- Language dropdown ---------- */
.lang {
	position: relative;
	display: inline-block;
}

.lang-button {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 1rem;
	color: var(--text-color);
}

.lang-arrow {
	font-size: 10px;
	transition: transform 0.2s ease;
}

.lang.is-open .lang-arrow {
	transform: rotate(180deg);
}

.lang-menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background-color: var(--background-color);
	border: 1px solid #ccc;
	border-radius: 4px;
	box-shadow: 0 2px 8px #0000001a;
	z-index: 1000;
	margin-top: 2px;
	min-width: 120px;
}

.lang-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	width: 100%;
	border: none;
	background: transparent;
	color: var(--text-color);
	cursor: pointer;
	font-size: 14px;
	text-align: left;
}

.lang-item:hover {
	background-color: #f5f5f5;
}

.lang-item.is-selected {
	background-color: var(--background-color-dark);
	font-weight: 700;
}

.flag {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

/* ---------- Burger + side menu ---------- */
.burger {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--text-color);
	width: 40px;
	height: 40px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-size: 32px;
	font-weight: 700;
	line-height: 1;
}

.burger span {
	display: block;
	width: 24px;
	height: 3px;
	margin: 3px auto;
	background-color: var(--text-color);
}

.menu {
	position: fixed;
	top: var(--header-height, 72px);
	right: 0;
	bottom: 0;
	width: 450px;
	background-color: var(--background-color);
	box-shadow: -2px 0 5px #0000004d;
	transform: translate(100%);
	transition: transform 0.3s ease;
	visibility: hidden;
	z-index: 999;
	padding: 1rem;
	overflow-y: auto;
}

.menu.is-open {
	transform: translate(0);
	visibility: visible;
}

.menu ul {
	list-style: none;
	margin: 1em 0;
	padding-left: 40px;
}

.menu li {
	margin-bottom: 1rem;
}

.menu li a {
	text-decoration: underline;
}

/* ---------- Search field ---------- */
.search {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	max-width: 400px;
}

.search-box {
	display: flex;
	border-radius: 10px;
	box-shadow: 0 2px 4px #0000001a;
	overflow: hidden;
	width: 100%;
	height: 3.5rem;
	background: #fff;
	transition: box-shadow 0.2s;
}

.search-box:focus-within {
	box-shadow:
		0 2px 4px #0000001a,
		0 0 0 3px #205ca026;
}

.search.is-invalid .search-box {
	box-shadow:
		0 2px 4px #0000001a,
		0 0 0 2px #e11d48;
}

.plate-strip {
	flex-shrink: 0;
	height: 100%;
	width: auto;
	display: block;
}

.search input {
	flex: 1;
	min-width: 0;
	width: 100%;
	border: none;
	outline: none;
	padding: 0 0 0 0.5rem;
	font-size: 2.4rem;
	letter-spacing: 4px;
	text-transform: uppercase;
	font-family: 'Roboto Mono', monospace;
	background: #fff;
	color: #0f2850;
}

.search input::placeholder {
	color: #9aa8bc;
	font-weight: 400;
	letter-spacing: 0.06em;
}

.search-button {
	flex-shrink: 0;
	min-width: 3.5rem;
	color: var(--ink);
	background-color: var(--accent);
	border: none;
	border-radius: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.search-button:hover {
	background-color: var(--accent-hover);
}

.search-button svg {
	width: 1.25rem;
	height: 1.25rem;
}

.search-error {
	color: #b91c1c;
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
	text-align: left;
}

/* Home page variant: field on top, wide button underneath */
.search.is-vertical {
	max-width: none;
	gap: 0.75rem;
}

.search.is-vertical .search-box {
	height: 4rem;
	box-shadow: none;
	border: 2px solid var(--card-border);
}

.search.is-vertical .search-box:focus-within {
	border-color: var(--primary-color-light);
	box-shadow: 0 0 0 3px #2d54b826;
}

.search.is-vertical.is-invalid .search-box {
	border-color: #e11d48;
}

.search.is-vertical input {
	font-size: 2.6rem;
}

.search.is-vertical .search-button {
	width: 100%;
	height: 3.5rem;
	font-size: 1.1rem;
	font-weight: 700;
	border-radius: 10px;
	background: var(--accent);
	color: var(--ink);
	transition: background 0.2s ease-in-out;
}

.search.is-vertical .search-button:hover {
	background: var(--accent-hover);
}

/* ---------- Home ---------- */
.home-hero {
	display: flex;
	justify-content: center;
	padding: 3.5rem 1.5rem 4.5rem;
	margin: -1rem -1rem 0;
	color: #fff;
	background:
		radial-gradient(60rem 30rem at 85% 0%, #2d54b866 0%, transparent 70%),
		linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
}

/* Text on the left, search panel on the right */
.home-content {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 3rem;
	align-items: center;
	width: 100%;
	max-width: 1100px;
}

.home-eyebrow {
	display: inline-block;
	margin: 0 0 1rem;
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	background: rgb(246 180 14 / 15%);
	color: var(--accent);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.home-title {
	font-size: 2.9rem;
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.025em;
	margin: 0 0 1rem;
}

.home-subtitle {
	font-size: 1.15rem;
	margin: 0 0 1.5rem;
	color: rgb(255 255 255 / 78%);
	line-height: 1.6;
}

.home-perks {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 0;
	padding: 0;
	font-weight: 600;
	font-size: 0.95rem;
}

.home-perks li {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.home-perks svg {
	width: 1rem;
	height: 1rem;
	color: var(--accent);
}

.home-search {
	width: 100%;
	padding: 1.75rem;
	border-radius: 18px;
	background: #fff;
	color: var(--text-color);
	box-shadow: 0 24px 60px rgb(5 12 35 / 35%);
}

.home-search-label {
	margin: 0 0 0.85rem;
	font-weight: 700;
	font-size: 1.1rem;
}

.home-section {
	max-width: 1000px;
	margin: 0 auto;
	padding: 3.5rem 0 0.5rem;
}

.home-section > h2 {
	font-size: 1.75rem;
	letter-spacing: -0.015em;
	margin: 0 0 1.5rem;
}

.home-section > h2::before {
	content: '';
	display: block;
	width: 2.5rem;
	height: 4px;
	margin-bottom: 0.75rem;
	border-radius: 2px;
	background: var(--accent);
}

.find-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.find-list li {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.65rem 1.15rem 0.65rem 0.65rem;
	background: #fff;
	border: 1px solid var(--card-border);
	border-radius: 999px;
	font-weight: 600;
}

.find-list svg {
	width: 1.6rem;
	height: 1.6rem;
	padding: 0.35rem;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--ink);
	color: var(--accent);
}

.how-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	counter-reset: step;
}

.how-list li {
	counter-increment: step;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid var(--card-border);
	border-top: 4px solid var(--primary-color);
	border-radius: 12px;
}

.how-list li::before {
	content: counter(step, decimal-leading-zero);
	display: block;
	margin-bottom: 0.5rem;
	color: var(--accent-text);
	font-size: 1.9rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
}

.how-list h3 {
	font-size: 1.1rem;
	margin: 0 0 0.4rem;
}

.how-list p {
	margin: 0;
	color: var(--text-color-secondary);
}

/* One white panel, questions separated by lines, +/− marker */
.faq {
	max-width: 760px;
	background: #fff;
	border: 1px solid var(--card-border);
	border-radius: 14px;
	overflow: hidden;
}

.faq details + details {
	border-top: 1px solid var(--card-border);
}

.faq summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	cursor: pointer;
	padding: 1.1rem 1.4rem;
	font-weight: 600;
	list-style: none;
}

.faq summary::-webkit-details-marker {
	display: none;
}

.faq summary::after {
	content: '+';
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	background: var(--background-color-dark);
	color: var(--primary-color);
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1;
}

.faq details[open] > summary::after {
	content: '−';
	background: var(--accent);
	color: var(--ink);
}

.faq summary:hover {
	color: var(--primary-color);
}

.faq details p {
	margin: 0;
	padding: 0 1.4rem 1.2rem;
	color: var(--text-color-secondary);
}

/* ---------- Cards + detail lists ---------- */
.card {
	border-radius: 10px;
	font-size: 15px;
	padding: 1.25rem 1.35rem;
	height: 100%;
	background-color: var(--secondary-background-color);
	border: 1px solid var(--card-border);
	box-shadow: 0 1px 2px var(--shadow-main), 0 8px 24px -12px var(--shadow-main);
	position: relative;
}

.card > h2 {
	margin: 0 0 1rem;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid var(--background-color-dark);
	font-size: 1.1rem;
	letter-spacing: -0.01em;
}

.details {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0;
}

.details > div {
	border-bottom: 1px solid #ebebeb;
	padding-bottom: 0.7rem;
	margin-bottom: 0.55rem;
}

.details > div:last-child {
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: 0;
}

.details dt {
	margin: 0 0 0.2rem;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.35;
	color: #666;
}

.details dd {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	overflow-wrap: anywhere;
}

.details dd svg {
	width: 1.1rem;
	height: 1.1rem;
	flex-shrink: 0;
}

/* ---------- Vehicle page ---------- */
body[data-page='vehicle'] {
	background: linear-gradient(180deg, #dfe6f6 0, var(--background-color) 24rem) no-repeat var(--background-color);
}

.vehicle-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1.5rem;
	max-width: 1200px;
	margin: 0 auto 2rem;
	padding: 0.5rem 2rem 2rem;
}

.grid-main {
	grid-area: 1 / 1 / 3 / 2;
}

.grid-owner {
	grid-column: 1;
}

.grid-general {
	grid-area: 1 / 2 / 4 / 3;
}

.grid-icons {
	grid-area: 4 / 1 / 4 / 3;
}

/* Bottom cards: three columns, grouped as on vegvesen.no */
.grid-info {
	grid-area: 5 / 1 / 6 / 3;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

.info-col {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.info-col > div {
	flex: 0 0 auto;
}

.info-col > div:last-child {
	flex: 1 1 auto;
}

.info-col .card {
	height: 100%;
}

/* Tyres and rims: full width under the three columns, one table per rim size */
.grid-tyres {
	grid-area: 6 / 1 / 7 / 3;
}

.tyre-group + .tyre-group {
	margin-top: 1.5rem;
}

.tyre-group > h3 {
	margin: 0 0 0.5rem;
	font-size: 1.05rem;
}

/* Wide tables scroll inside the card, never the page */
.table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.tyre-table {
	width: 100%;
	min-width: 640px;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.tyre-table th,
.tyre-table td {
	padding: 0.55rem 0.75rem 0.55rem 0;
	text-align: left;
	vertical-align: top;
	white-space: nowrap;
	border-bottom: 1px solid #ebebeb;
}

.tyre-table thead th {
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.35;
	color: #666;
	white-space: nowrap;
}

.tyre-table tbody th {
	font-weight: 500;
	white-space: nowrap;
}

/* One combination per tbody: a stronger line between combinations */
.tyre-table tbody + tbody tr:first-child > * {
	border-top: 2px solid #d9d9d9;
}

.tyre-table tbody:last-child tr:last-child > * {
	border-bottom: none;
}

.hero-row {
	display: flex;
	align-items: flex-start;
}

.hero-icon {
	width: 50px;
	height: 50px;
	flex-shrink: 0;
	margin-right: 1rem;
	color: var(--primary-color);
}

.hero-text {
	min-width: 0;
	flex: 1;
}

.hero-text h1 {
	color: var(--primary-color);
	font-size: 2em;
	margin: 0 0 1rem;
	line-height: 1.5;
}

.hero-text h2,
.hero-text p {
	margin: 0;
	padding: 0;
	line-height: 1.2rem;
}

.hero-text h2 {
	font-size: 1.5em;
	line-height: 1.3; /* make + model on one line; long names wrap without overlapping */
	margin-bottom: 0.25rem;
}

.hero-text p {
	text-transform: uppercase;
}

.hero-details {
	margin-top: 1rem;
}

.hero-details .details > div {
	border-bottom-color: #ddd;
}

/* Owner / paywall card */
.owner {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.owner h2 {
	margin: 0;
	font-size: 1.5rem;
}

.owner p {
	margin: 0;
	line-height: 2;
}

.owner-box {
	border: 1px solid lightgray;
	border-radius: 8px;
	padding: 1rem;
	gap: 1rem;
	display: flex;
	flex-direction: column;
}

.owner-locked {
	background-color: #fff;
	border: 1px solid lightgray;
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 0.5rem;
}

.owner-locked p {
	color: transparent;
	text-shadow: 0 0 7px rgba(0, 0, 0, 1);
	-webkit-user-select: none;
	user-select: none;
	font-size: 1.2rem;
	line-height: 1.5;
}

.owner-price {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
}

.owner-price-label {
	font-size: 0.9rem;
	color: #0369a1;
	font-weight: 500;
}

.owner-price-amount {
	font-size: 1.3rem;
	font-weight: 700;
	color: #0284c7;
	white-space: nowrap;
}

.cta {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	border-radius: 999px;
	background-color: var(--cta-color);
	color: #fff;
	font-size: 1.05rem;
	font-weight: 700;
}

.cta:hover {
	background-color: var(--cta-color-hover);
	text-decoration: none;
}

button.cta {
	border: none;
	cursor: pointer;
}

.cta:disabled {
	opacity: 0.7;
	cursor: progress;
}

.owner .owner-note {
	margin-top: 0.75rem;
	text-align: center;
	font-size: 1rem;
	line-height: 1.4;
}

.owner .owner-terms {
	text-align: center;
	font-size: 1rem;
	line-height: 1.4;
}

.owner .owner-login {
	text-align: center;
	margin-top: 1rem;
	font-size: 0.9rem;
	line-height: 1.5;
}

.owner-login a {
	color: var(--primary-color);
	text-decoration: underline;
}

/* Icon strip */
.icon-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}

.icon-item {
	width: 7rem;
	margin: 0.5rem;
	line-height: 1rem;
	text-align: center;
}

.icon-item strong {
	white-space: nowrap;
}

.icon-item svg {
	height: 3rem;
	width: 3rem;
}

/* Not found / invalid */
.no-info {
	padding: 2rem;
	margin: 2rem auto;
	background-color: var(--secondary-background-color);
	border-radius: 8px;
	max-width: 600px;
	border: 1px solid var(--card-border);
	box-shadow: 0 4px 14px 0 var(--shadow-main);
}

.no-info h2 {
	font-size: 1.8rem;
	margin-bottom: 0.5rem;
}

.no-info p {
	margin: 0.5rem 0;
}

.no-info a {
	text-decoration: underline;
}

/* Min side */
.account .cta {
	margin: 1rem 0;
	text-decoration: none;
}

.account .details {
	margin: 1rem 0;
}

.account-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 1rem 0;
}

/* Email login (Min side and the buy modal) */
.login-form {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 1rem 0;
}

.login-form label {
	font-weight: 600;
}

.login-form input {
	width: 100%;
	min-height: 44px;
	padding: 0.5rem 0.875rem;
	border: 1px solid var(--card-border);
	border-radius: 10px;
	background: var(--secondary-background-color);
	color: var(--text-color);
	font: inherit;
	font-size: 1rem;
}

.login-form input:focus {
	outline: 2px solid var(--primary-color);
	outline-offset: 1px;
	border-color: var(--primary-color);
}

.login-form .login-code {
	font-family: 'Roboto Mono', monospace;
	font-size: 1.4rem;
	letter-spacing: 0.4em;
	text-align: center;
}

.login-form .cta {
	margin: 0.5rem 0 0;
}

.login-error,
.login-info {
	margin: 0;
	font-size: 0.95rem;
}

.login-hint {
	margin: 0;
	font-size: 0.8rem;
	color: var(--text-color-secondary);
	overflow-wrap: anywhere;
}

.login-error {
	color: #b42318;
}

.login-info {
	color: var(--primary-color);
}

.login-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	margin-top: 0.25rem;
	font-size: 0.95rem;
}

.link-button:disabled {
	opacity: 0.5;
	cursor: default;
}

.notice.is-info {
	background: #e8eefb;
	border-color: #c3d1f0;
	border-left-color: var(--primary-color);
	color: var(--primary-color-border);
}

.login-modal {
	background-color: rgb(15 29 69 / 50%);
}

.login-box {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 1.75rem 1.5rem 1.25rem;
	border-radius: 14px;
	background: var(--secondary-background-color);
	box-shadow: 0 10px 40px rgb(0 0 0 / 20%);
}

.login-box h2 {
	margin: 0 0 0.5rem;
	font-size: 1.4rem;
}

.login-box > p {
	margin: 0;
	color: var(--text-color-secondary);
}

.purchase-box > p {
	margin: 0.75rem 0 0;
}

.purchase-box > p.login-error {
	color: #b42318;
}

.purchase-box .cta {
	width: 100%;
	margin: 1rem 0 0;
}

.purchase-box .login-links {
	justify-content: center;
}

.purchase-loading {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.purchase-email {
	font-weight: bold;
	color: var(--text-color);
	overflow-wrap: anywhere;
}

.spinner {
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	border: 3px solid rgb(0 0 0 / 12%);
	border-top-color: var(--primary-color);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.spinner {
		animation-duration: 2.4s;
	}
}

.login-close {
	position: absolute;
	top: 0.5rem;
	right: 0.75rem;
	padding: 0.25rem;
	border: none;
	background: none;
	color: var(--text-color-secondary);
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}

.demo-note {
	max-width: 1200px;
	margin: 0 auto 1rem;
	padding: 0 2rem;
}

.demo-note p {
	margin: 0;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	background: #fef3cd;
	border: 1px solid #f6d55c;
	border-left: 4px solid #f39c12;
	color: #8b5a00;
}

.loading {
	text-align: center;
	padding: 4rem 1rem;
	color: var(--text-color-secondary);
}

/* ---------- Modal ---------- */
.modal {
	position: fixed;
	inset: 0;
	background-color: var(--shadow-main);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2000;
	padding: 1rem;
}

.modal-content {
	max-width: 900px;
	max-height: 90vh;
	overflow-y: auto;
	width: 100%;
	height: auto;
}

.modal-body {
	text-align: center;
	padding: 2rem;
	font-size: 1.2rem;
	color: var(--text-color-secondary);
	border-bottom: 1px solid var(--secondary-color);
}

.modal-source {
	display: flex;
	justify-content: space-between;
	font-size: 0.8rem;
	color: var(--text-color-secondary);
	margin-top: 0.5rem;
}

.modal-actions {
	display: flex;
	justify-content: center;
	margin-top: 1.5rem;
}

.button {
	padding: 10px 20px;
	font-size: 16px;
	cursor: pointer;
	border: none;
	border-radius: 10px;
	height: 3rem;
	width: 200px;
	color: #fff;
	background-color: var(--primary-color);
}

.button:hover {
	background-color: var(--primary-color-light);
}

/* ---------- Cookie consent ---------- */
.consent {
	position: fixed;
	inset: 0;
	z-index: 3000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgb(15 29 69 / 55%);
}

.consent-box {
	width: 100%;
	max-width: 26rem;
	max-height: 100%;
	overflow-y: auto;
	padding: 1.5rem;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 40px rgb(0 0 0 / 25%);
	font-size: 0.9rem;
}

.consent-box h2 {
	font-size: 1.15rem;
	margin: 0 0 0.75rem;
}

.consent-box p {
	margin: 0 0 1.25rem;
	color: var(--text-color-secondary);
}

.consent-category {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.75rem;
	margin-bottom: 0.5rem;
	border: 1px solid var(--card-border);
	border-radius: 10px;
	color: var(--text-color-secondary);
	cursor: pointer;
}

.consent-category input {
	margin-top: 0.2rem;
	width: 1.1rem;
	height: 1.1rem;
	flex-shrink: 0;
	accent-color: var(--primary-color);
}

.consent-category strong {
	display: block;
	color: var(--text-color);
}

.consent-buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	margin-top: 1rem;
}

.consent-buttons button {
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
	border: none;
	border-radius: 10px;
	background: var(--background-color-dark);
	color: var(--text-color);
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
}

.consent-buttons button:hover {
	background: var(--secondary-color);
}

.consent-buttons .consent-primary {
	background: var(--primary-color);
	color: #fff;
}

.consent-buttons .consent-primary:hover {
	background: var(--primary-color-border);
}

.consent-buttons .consent-wide {
	grid-column: 1 / -1;
}

.link-button {
	padding: 0;
	border: none;
	background: none;
	color: inherit;
	font-size: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.notice {
	padding: 0.75rem 1rem;
	border-radius: 8px;
	background: #fef3cd;
	border: 1px solid #f6d55c;
	border-left: 4px solid #f39c12;
	color: #8b5a00;
}

/* ---------- Info pages (same look as the home page) ---------- */
.info-page {
	max-width: 700px;
	margin: 0 auto;
	padding: 2.5rem 0;
}

.info-head {
	text-align: center;
	margin-bottom: 1.5rem;
}

.info-head h1 {
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.2;
	margin: 0 0 0.75rem;
	overflow-wrap: break-word;
	hyphens: auto;
}

.info-head p {
	margin: 0;
	color: var(--text-color-secondary);
	line-height: 1.6;
}

.info-head strong {
	color: var(--text-color);
}

.info-page .notice {
	margin: 0 0 1.5rem;
}

.info-note {
	margin: 0 0 1.5rem;
	font-size: 0.9rem;
	color: var(--text-color-secondary);
}

.faq-body {
	padding: 0 1.25rem 1rem;
	color: var(--text-color-secondary);
}

.faq-body > :first-child {
	margin-top: 0;
}

.faq-body > :last-child {
	margin-bottom: 0;
}

.faq-body p {
	margin: 0 0 0.6rem;
}

.faq-body ul,
.faq-body ol {
	margin: 0 0 0.6rem;
	padding-left: 1.25rem;
}

.faq-body li {
	margin: 0.35rem 0;
}

.faq-body strong {
	color: var(--text-color);
}

.link-list {
	list-style: none;
	margin: 0 0 0.75rem;
	padding: 0;
}

.link-list a {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	position: relative;
	padding: 1rem 2.75rem 1rem 1.25rem;
	margin-bottom: 0.75rem;
	background: #fff;
	border: 1px solid var(--card-border);
	border-radius: 12px;
	color: var(--text-color);
	transition: border-color 0.15s ease;
}

.link-list a[href]::after {
	content: '›';
	position: absolute;
	top: 50%;
	right: 1.25rem;
	transform: translateY(-50%);
	font-size: 1.5rem;
	line-height: 1;
	color: var(--primary-color);
}

.link-list a[href]:hover {
	border-color: var(--primary-color);
	text-decoration: none;
}

.link-title {
	font-weight: 600;
}

.link-sub {
	font-size: 0.9rem;
	color: var(--text-color-secondary);
	overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.site-footer {
	background-color: var(--ink);
	color: rgb(255 255 255 / 72%);
	padding: 2.5rem 1.5rem 1.5rem;
	margin-top: 4rem;
}

.footer-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 2rem 3rem;
	max-width: 1100px;
	margin: 0 auto;
}

.footer-brand p {
	margin: 0.9rem 0 0;
	max-width: 30rem;
	line-height: 1.6;
}

.footer-inner h3 {
	margin: 0 0 0.75rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}

.footer-inner ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 0.5rem;
}

.footer-inner a,
.footer-inner .link-button {
	color: #fff;
	text-decoration: none;
	transition: color 0.2s;
}

.footer-inner a:hover,
.footer-inner .link-button:hover {
	color: var(--accent);
	text-decoration: none;
}

.footer-bottom {
	max-width: 1100px;
	margin: 2rem auto 0;
	padding-top: 1.25rem;
	border-top: 1px solid rgb(255 255 255 / 14%);
	font-size: 0.8rem;
}

.footer-bottom p {
	margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
	main {
		margin: 2.5%;
	}

	.vehicle-grid {
		display: flex;
		flex-direction: column;
		gap: 1rem;
		padding: 0;
	}

	.grid-info {
		grid-template-columns: minmax(0, 1fr);
		gap: 1rem;
	}

	/* Hero: search panel under the text */
	.home-content {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.75rem;
	}

	.demo-note {
		padding: 0;
	}
}

@media (max-width: 768px) {
	main {
		min-height: calc(100vh - 80px);
	}

	.nav-right > .lang {
		display: none;
	}

	/* The wordmark is too long to share a row with the search field */
	.site-nav {
		flex-wrap: wrap;
		padding: 0.5rem 1rem;
	}

	.nav-left {
		display: contents;
	}

	.logo {
		margin-right: auto;
	}

	.site-nav .search {
		order: 3;
		flex: 0 0 100%;
		max-width: none;
		margin: 0.25rem 0 0.5rem;
	}

	.menu {
		width: 100%;
	}

	.menu ul {
		padding-left: 1rem;
	}

	.search-box {
		height: 3rem;
	}

	.search input {
		font-size: 1.6rem;
		letter-spacing: 2px;
	}

	.search-button {
		min-width: 3rem;
	}

	.search.is-vertical .search-box {
		height: 3.5rem;
	}

	.search.is-vertical input {
		font-size: 2rem;
		letter-spacing: 3px;
	}

	.search.is-vertical .search-button {
		height: 3rem;
		font-size: 1rem;
	}

	.home-hero {
		padding: 2rem 1rem 2.25rem;
		/* main has margin 2.5% of the page; a % here is of main (95% of the page), so 2.5 / 0.95 */
		margin: calc(-2.5% / 0.95) calc(-2.5% / 0.95) 0;
	}

	.home-title {
		font-size: 1.9rem;
	}

	.home-subtitle {
		font-size: 1rem;
		margin-bottom: 1rem;
	}

	.home-search {
		padding: 1.15rem;
		border-radius: 14px;
	}

	.home-section {
		padding-top: 2.5rem;
	}

	.home-section > h2 {
		font-size: 1.45rem;
	}

	.find-list {
		gap: 0.5rem;
	}

	.find-list li {
		font-size: 0.9rem;
	}

	.how-list {
		grid-template-columns: 1fr;
	}

	.footer-inner {
		grid-template-columns: 1fr;
	}

	.info-page {
		padding: 1.5rem 0;
	}

	.info-head h1 {
		font-size: 1.6rem;
	}
}
