html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Setup values grid: alternate row colours; the value inputs blend into the row until focused. */
.setup-grid { max-height: 28rem; overflow-y: auto; }
.setup-grid thead th { position: sticky; top: 0; z-index: 1; }
.setup-grid .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: #eef4fb; }
.setup-grid .table-striped > tbody > tr:nth-of-type(even) > * { --bs-table-bg-type: #ffffff; }
.setup-grid td { padding-top: .15rem; padding-bottom: .15rem; }
.setup-grid td .form-control { background: transparent; border-color: transparent; }
.setup-grid td .form-control:hover { border-color: var(--bs-border-color); }
.setup-grid td .form-control:focus { background: #fff; border-color: #86b7fe; }
.setup-grid .new-row .form-control { border-color: var(--bs-border-color); border-style: dashed; }
.setup-grid th.sortable { cursor: pointer; user-select: none; }
.setup-grid th.sortable:hover { text-decoration: underline; }
.setup-grid .sort-mark { font-size: .7em; color: var(--bs-secondary-color); }

/* Brand: logo + wordmark in the navbar, blue #1457c8 / orange #ff7a1a. */
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: #0d1b33; }
.brand img { border-radius: 8px; }
.brand b { color: #1457c8; }

/* Home page */
.home-hero { background: linear-gradient(135deg, #f2f6fd 0%, #e3ecfb 100%); border-radius: 1.5rem; padding: 2.5rem 2rem; }
.home-hero h1 { font-weight: 800; letter-spacing: -.02em; color: #0d1b33; }
.home-hero h1 span { color: #1457c8; }
.home-hero .lead { color: #46516a; }
.home-hero img { width: 100%; height: auto; max-width: 560px; border-radius: 1.25rem; box-shadow: 0 18px 40px rgba(8, 31, 77, .25); }
.home-hero .btn-primary { background: #ff7a1a; border-color: #ff7a1a; }
.home-hero .btn-primary:hover { background: #e9650a; border-color: #e9650a; }
.home-steps .step { height: 100%; border: 1px solid #e3e8f2; border-radius: 1rem; padding: 1.1rem; background: #fff; }
.home-steps .step img { width: 48px; height: 48px; margin-bottom: .6rem; }
.home-steps .step h3 { font-size: 1rem; font-weight: 700; margin-bottom: .3rem; }
.home-steps .step p { font-size: .9rem; color: #5b6478; margin: 0; }
.home-steps .num { color: #ff7a1a; font-weight: 800; margin-right: .25rem; }
@media (max-width: 575.98px) { .home-hero { padding: 1.5rem 1rem; border-radius: 1rem; } }
.navbar .nav-link { white-space: nowrap; }

/* ---- Site-wide look (matches the home page) ---- */
body { background: #f7f9fd; }
.navbar { box-shadow: 0 1px 0 #e3e8f2; }
.card { border: 1px solid #e3e8f2; border-radius: 1rem; box-shadow: 0 2px 10px rgba(13, 27, 51, .04); }
.card > .card-header:first-child { border-radius: 1rem 1rem 0 0; }
.card > .card-footer:last-child { border-radius: 0 0 1rem 1rem; }
.btn-accent { --bs-btn-color: #fff; --bs-btn-bg: #ff7a1a; --bs-btn-border-color: #ff7a1a; --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #e9650a; --bs-btn-hover-border-color: #e9650a; --bs-btn-active-bg: #d65c08; --bs-btn-active-border-color: #d65c08;
  --bs-btn-active-color: #fff; --bs-btn-disabled-bg: #ffb27a; --bs-btn-disabled-border-color: #ffb27a; font-weight: 600; }
.footer { background: #fff; }
.footer img { vertical-align: -4px; margin-right: .35rem; border-radius: 4px; }

/* Page header band */
.page-header { display: flex; align-items: center; gap: 1rem; background: linear-gradient(135deg, #f2f6fd 0%, #e3ecfb 100%);
  border-radius: 1.25rem; padding: 1.1rem 1.4rem; margin-bottom: 1.25rem; }
.page-header h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; color: #0d1b33; margin: 0; }
.page-header p { margin: .15rem 0 0; color: #46516a; }
.section-title { font-size: 1.1rem; font-weight: 700; color: #0d1b33; }

/* Empty state */
.empty-state { text-align: center; padding: 2rem 1rem; border: 2px dashed #d5deee; border-radius: 1.25rem; background: #fff; margin-bottom: 1.25rem; }
.empty-state img { width: 72px; height: 72px; margin-bottom: .75rem; }
.empty-state p { color: #5b6478; }

/* Brand logos / badges */
.brand-mark { height: 20px; width: auto; max-width: 110px; object-fit: contain; }
.brand-badge { display: inline-block; color: #fff; font-weight: 800; font-style: italic; letter-spacing: .04em; font-size: .72rem;
  padding: .18rem .55rem; border-radius: .35rem; line-height: 1.3; }

/* Car and track cards */
.item-card { height: 100%; display: flex; flex-direction: column; }
.item-card .card-body { display: flex; flex-direction: column; gap: .5rem; }
.item-card .art { display: block; width: 100%; height: 64px; object-fit: contain; margin: .25rem 0; }
.item-card .title { font-weight: 700; font-size: 1.05rem; color: #0d1b33; margin: 0; }
.item-card .meta { font-size: .85rem; color: #5b6478; }
.item-card dl { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; font-size: .85rem; margin: 0; }
.item-card dt { color: #5b6478; font-weight: 500; }
.item-card dd { margin: 0; color: #0d1b33; overflow-wrap: anywhere; }
.item-card .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: .4rem; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: #eaf1fc; color: #1457c8; }
.pill-carpet { background: #e3ebfa; color: #2b4d86; }
.pill-asphalt { background: #e4e6ea; color: #33383f; }
.pill-muted { background: #f0f2f6; color: #5b6478; }
.grip-meter { display: inline-flex; align-items: flex-end; gap: 2px; vertical-align: middle; margin-right: .3rem; }
.grip-meter i { width: 5px; height: 14px; border-radius: 2px; background: #e3e8f2; }
.grip-meter i.on { background: #ff7a1a; }

/* Login / register: illustration beside the form */
.auth-art img { width: 100%; height: auto; max-width: 520px; border-radius: 1.25rem; box-shadow: 0 18px 40px rgba(8, 31, 77, .2); }
.paid-badge { display: inline-block; font-size: .72rem; font-weight: 800; padding: .2rem .6rem; border-radius: 999px; margin-right: .35rem; vertical-align: 1px; }
.paid-own { background: #e6f4ea; color: #1e7b3c; }
.paid-site { background: #eaf1fc; color: #1457c8; }
.paid-none { background: #f0f2f6; color: #5b6478; }
.progress.allowance { height: .6rem; border-radius: 999px; background: #e3e8f2; }
.progress.allowance .progress-bar { background: #ff7a1a; }
.privacy-card h2 { display: flex; align-items: center; gap: .6rem; }
.privacy-card h2 img { width: 36px; height: 36px; }

/* Advisor page */
.picked-car img:first-child { height: 38px; width: auto; }
.session-card { border-left: 4px solid #1457c8; }
.answer-card { border-left: 4px solid #e3e8f2; }
.answer-card.fb-better { border-left-color: #2e9e57; }
.answer-card.fb-nochange { border-left-color: #9aa3b5; }
.answer-card.fb-worse { border-left-color: #d9433b; }
.answer-kind { display: inline-block; font-size: .68rem; font-weight: 800; padding: .1rem .45rem; border-radius: 999px; margin-right: .45rem; vertical-align: 2px; }
.kind-free { background: #f0f2f6; color: #5b6478; }
.kind-ai { background: #fff1e6; color: #c25406; }
.setup-grid thead th { background: #1457c8; color: #fff; border-color: #1457c8; }
.setup-grid thead th.sortable:hover { background: #0f47a8; }
.item-card .track-art { height: 96px; object-fit: cover; border-radius: .75rem; margin-top: 0; }
/* Default Identity log-in / register markup: one column, no empty "another service" block. */
.auth-page h1 { font-weight: 800; color: #0d1b33; }
.auth-page .row > div:not(:first-child) { display: none; }
.auth-page .row > div:first-child { flex: 0 0 100%; max-width: 30rem; }
.auth-page section h2, .auth-page form > h2 { font-size: 1rem; color: #5b6478; font-weight: 500; }
.auth-page form { background: #fff; border: 1px solid #e3e8f2; border-radius: 1rem; padding: 1.25rem; box-shadow: 0 2px 10px rgba(13, 27, 51, .04); }
.auth-page .btn-primary { --bs-btn-bg: #ff7a1a; --bs-btn-border-color: #ff7a1a; --bs-btn-hover-bg: #e9650a; --bs-btn-hover-border-color: #e9650a; --bs-btn-active-bg: #d65c08; font-weight: 600; }
.item-card .track-photo { object-fit: cover; }
.track-thumb { width: 96px; height: 54px; object-fit: cover; border-radius: .4rem; border: 1px solid #e3e8f2; }
.layout-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.layout-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; padding: .1rem .5rem .1rem .15rem; border-radius: 999px; background: #eef2f8; color: #34405a; }
.layout-chip:not(:has(img)) { padding-left: .5rem; }
.layout-chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.track-hero { width: 260px; max-width: 100%; height: 150px; object-fit: cover; border-radius: .75rem; }
.layout-map { display: block; width: 100%; height: 180px; object-fit: contain; background: #f4f6fa; border-radius: .75rem; margin-bottom: .5rem; }
.layout-map-empty { display: flex; align-items: center; justify-content: center; color: #8a94a8; font-size: .85rem; }
.layout-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: .4rem; }
.track-map { width: 100%; height: 260px; border: 0; border-radius: .75rem; }
.item-card .place { font-size: .8rem; color: #6b7487; margin-top: .4rem; }
.item-card .place a { color: inherit; }
.item-card .art.car-photo { height: 150px; object-fit: contain; border-radius: .75rem; background: #fff; }
.picked-car img.car-photo { height: 64px; width: 96px; object-fit: contain; border-radius: .4rem; background: #fff; }
.model-preview { max-width: 100%; height: 180px; object-fit: contain; border-radius: .75rem; background: #fff; }
.car-layouts { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.car-layouts > div { flex-basis: 100%; }
a.layout-chip { text-decoration: none; }
a.layout-chip:hover { background: #dfe6f2; }
.car-setups .car-setup-row { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: .25rem; }
.car-setups .car-setup-row > a:first-child { font-weight: 600; margin-right: .2rem; }
a.layout-chip.current { background: #ffe8d6; color: #a34800; }
.setup-version:target { background: #fff4e8; border-radius: .4rem; scroll-margin-top: 5rem; }
.run-conditions { background: #f6f8fc; border: 1px solid #e3e8f2; border-radius: .6rem; padding: .6rem .7rem; }
