:root {
  --ink: #1b1d1f;
  --steel: #2a2d31;
  --bg: #ecebe6;
  --card: #ffffff;
  --text: #1b1d1f;
  --muted: #5c6066;
  --line: #d3d2cb;
  --accent: #e5560a;
  --accent-dark: #bf4508;
  --accent-soft: #fdeee4;
  --star: #f2a900;
  --ok: #1f7a3f;
  --warn: #b26a00;
  --radius: 4px;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  --head: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
select, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.05; }
.muted { color: var(--muted); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink); color: #fff; border-bottom: 4px solid var(--accent); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 26px; text-transform: uppercase; letter-spacing: 0.04em; }
.brand-mark { width: 14px; height: 30px; background: var(--accent); transform: skewX(-12deg); }
.brand-logo { width: 44px; height: 44px; display: block; }
.brand-word em { font-style: normal; color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.mode { display: flex; border: 1px solid #45494e; }
.mode-btn {
  border: 0; background: transparent; padding: 8px 16px; color: #b8bcc2;
  font-family: var(--head); font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em;
}
.mode-btn + .mode-btn { border-left: 1px solid #45494e; }
.mode-btn.is-active { background: #fff; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  border: 2px solid var(--accent); background: var(--accent); color: #fff;
  padding: 10px 18px; font-family: var(--head); font-weight: 700; font-size: 16px;
  text-transform: uppercase; letter-spacing: 0.06em; border-radius: var(--radius);
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: #fff; border-color: var(--text); color: var(--text); }
.btn-dark { background: var(--ink); border-color: var(--ink); }
.btn-dark:hover { background: var(--steel); border-color: var(--steel); }
.btn-sm { padding: 7px 12px; font-size: 14px; }
.btn-outline-light { background: transparent; border-color: #fff; color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- Hero ---------- */
.hero { background: var(--steel); color: #fff; padding: 44px 0 36px; background-image: repeating-linear-gradient(135deg, transparent 0 28px, rgba(255,255,255,0.025) 28px 30px); }
.hero h1 { font-size: 46px; max-width: 720px; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { margin: 8px 0 0; color: #c4c8cd; font-size: 17px; }
.search { display: flex; margin-top: 22px; max-width: 720px; }
.search input {
  flex: 1; height: 52px; padding: 0 16px; border: 0; background: #fff; color: var(--text);
  font-size: 17px; outline: none; border-radius: var(--radius) 0 0 var(--radius);
}
.search input::placeholder { color: #8a8f96; }
.search .btn { border-radius: 0 var(--radius) var(--radius) 0; height: 52px; }

.hero-alt { margin-top: 14px !important; font-size: 15px !important; color: #9aa0a6 !important; }
.hero-alt a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hero-alt a:hover { color: #fff; }

/* ---------- Driver CTA ---------- */
.cta { background: var(--accent); color: #fff; background-image: repeating-linear-gradient(135deg, transparent 0 28px, rgba(0,0,0,0.06) 28px 30px); }
.cta-inner { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; padding: 44px 20px; }
.cta-mark { width: 140px; height: 140px; display: block; }
.cta h2 { font-size: 38px; max-width: 640px; text-wrap: balance; }
.cta h2 em { font-style: normal; color: var(--ink); }
.cta-points { list-style: none; margin: 16px 0 20px; padding: 0; display: grid; gap: 6px; font-size: 15px; max-width: 640px; }
.cta-points li::before { content: "▸"; color: var(--ink); margin-right: 8px; font-weight: 700; }
.cta .actions { margin-top: 0; }
.cta .btn { background: var(--ink); border-color: var(--ink); }
.cta .btn:hover { background: var(--steel); border-color: var(--steel); }
.cta .note { color: rgba(255,255,255,0.85); }
@media (max-width: 720px) {
  .cta-inner { grid-template-columns: 1fr; gap: 16px; padding: 32px 20px; }
  .cta-mark { width: 96px; height: 96px; }
  .cta h2 { font-size: 30px; }
}

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 32px; padding: 32px 0 56px; }
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .hero { padding: 28px 0 24px; }
  .hero h1 { font-size: 34px; }
  .topbar-inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
}

/* ---------- Filters ---------- */
.filters { display: flex; flex-direction: column; gap: 22px; }
.filter-group h3 { font-size: 15px; letter-spacing: 0.08em; color: var(--text); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: var(--radius);
  padding: 5px 10px; font-size: 13px; font-weight: 600; color: var(--text); text-transform: uppercase; letter-spacing: 0.03em;
}
.chip:hover { border-color: var(--text); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
select {
  height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-weight: 500;
}
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }

/* ---------- Results ---------- */
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.results-head span { font-family: var(--head); font-size: 18px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; color: var(--text); }
.cards { display: grid; gap: 10px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start;
  cursor: pointer; transition: border-color 0.12s, box-shadow 0.12s; text-align: left; width: 100%; color: var(--text);
}
.card:hover { border-color: var(--ink); border-left-color: var(--accent); box-shadow: var(--shadow); }
.card.is-verified { border-left-color: var(--ok); }
.card-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--head); font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.card-sub { font-size: 14px; color: var(--muted); margin-top: 2px; font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius); background: var(--bg); color: var(--text); text-transform: uppercase; letter-spacing: 0.04em; }
.tag-type { background: var(--ink); color: #fff; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius); text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--body); }
.badge-ok { background: var(--ok); color: #fff; }
.badge-warn { background: var(--warn); color: #fff; }
.badge-off { background: #c8c9c3; color: var(--ink); }
.rating { text-align: right; white-space: nowrap; }
.stars { color: var(--star); letter-spacing: 1px; font-size: 15px; }
.rating strong { font-family: var(--head); font-size: 28px; display: block; line-height: 1; }
.rating small { color: var(--muted); font-size: 12px; font-weight: 500; }
.empty { padding: 48px 0; text-align: center; font-weight: 500; }

/* ---------- Drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(27, 29, 31, 0.55); z-index: 20; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(540px, 100%); background: var(--card);
  z-index: 30; transform: translateX(100%); transition: transform 0.2s ease; overflow-y: auto; padding: 28px;
  border-left: 6px solid var(--accent);
}
.drawer.is-open { transform: translateX(0); }
.drawer-close {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 0; background: var(--ink); color: #fff;
  border-radius: var(--radius); font-size: 22px; line-height: 1;
}
.profile h2 { font-size: 32px; margin-right: 44px; }
.profile-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 18px 0; }
.profile-meta dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.profile-meta dd { margin: 0; font-weight: 600; font-size: 16px; }
.section { border-top: 2px solid var(--ink); padding-top: 16px; margin-top: 20px; }
.section h3 { font-size: 20px; margin-bottom: 10px; }
.verify { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; margin-top: 14px; }
.verify .dot { width: 12px; height: 12px; border-radius: 2px; margin-top: 5px; flex: none; }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); } .dot-off { background: #9a9d9a; }

.review { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.review-head strong { font-weight: 700; }
.review-head small { color: var(--muted); }
.review p { margin: 4px 0 0; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 12px; }
.form label, .rate-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.form input, .form select, .form textarea, .rate-form textarea, .rate-form select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: 15px;
  background: #fff; color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 500; resize: vertical;
}
.form input:focus, .form select:focus, .form textarea:focus, .rate-form textarea:focus, .rate-form select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.form input[type="checkbox"] { width: 17px; height: 17px; padding: 0; flex: none; }
.form label.check { display: flex; align-items: center; gap: 8px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .chips { margin-top: 2px; }
.rate-form { display: grid; gap: 10px; }
.star-pick { display: flex; gap: 2px; }
.star-pick button { border: 0; background: none; font-size: 30px; color: #cfd0ca; padding: 0 2px; line-height: 1; }
.star-pick button.is-on { color: var(--star); }
.rate-form .row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.note { font-size: 12px; color: var(--muted); }
.done { background: var(--ok); color: #fff; padding: 12px 14px; border-radius: var(--radius); font-weight: 600; }

/* Consent block */
.consent { background: var(--bg); border-left: 4px solid var(--accent); padding: 14px 16px; font-size: 14px; }
.consent p { margin: 0 0 10px; }
.consent .check { align-items: flex-start; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--text); display: flex; }
.consent .check input { margin-top: 3px; flex: none; }
.steps { display: flex; gap: 6px; margin: 6px 0 18px; }
.steps span { flex: 1; height: 5px; background: var(--line); border-radius: 2px; }
.steps span.is-on { background: var(--accent); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal .overlay { z-index: 0; }
.modal-card { background: #fff; width: min(600px, 100%); max-height: 92vh; overflow-y: auto; border-radius: var(--radius); padding: 28px; position: relative; z-index: 1; border-top: 6px solid var(--accent); }
.form .field { display: grid; gap: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.modal-card h2 { font-size: 30px; margin-bottom: 4px; margin-right: 44px; }
.modal-card .lede { margin: 0 0 16px; color: var(--muted); }
.modal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 0; background: var(--ink); color: #fff; border-radius: var(--radius); font-size: 22px; line-height: 1; }
.form-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }

.foot { background: var(--ink); color: #b8bcc2; margin-top: 24px; border-top: 4px solid var(--accent); }
.foot-inner { padding: 40px 20px 32px; display: grid; gap: 28px; }
.foot-logo img { width: min(320px, 80vw); height: auto; display: block; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 640px; }
.foot-cols h4 { margin: 0 0 8px; font-family: var(--head); font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: #fff; }
.foot-cols a { display: block; font-size: 14px; color: #b8bcc2; padding: 3px 0; }
.foot-cols a:hover { color: #fff; }
.foot-note { margin: 0; font-size: 13px; color: #8a8f96; }
.foot-note a { color: #b8bcc2; text-decoration: underline; }
@media (max-width: 560px) { .foot-cols { grid-template-columns: 1fr 1fr; } }

/* ---------- Avatars ---------- */
.avatar {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 56px; height: 56px; border-radius: var(--radius); overflow: hidden;
  background: var(--steel); color: #fff; font-family: var(--head); font-weight: 700; font-size: 20px; letter-spacing: 0.04em;
}
.avatar-lg { width: 88px; height: 88px; font-size: 32px; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-driver { grid-template-columns: auto 1fr auto; }
.profile-head { display: flex; gap: 16px; align-items: flex-start; margin-right: 44px; }
.photo-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 480px) {
  .card-driver { grid-template-columns: auto 1fr; }
  .card-driver .rating { grid-column: 2; text-align: left; }
}
.photo-pick .note { flex-basis: 100%; text-transform: none; letter-spacing: 0; font-weight: 500; }

/* ---------- Accounts, actions, toast ---------- */
.auth-slot { display: flex; gap: 8px; align-items: center; }
.btn-ghost-dark { color: #fff; border-color: #6b7078; }
.btn-ghost-dark:hover { background: #fff; color: var(--ink); border-color: #fff; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.contact-reveal { font-weight: 600; font-size: 14px; background: var(--accent-soft); padding: 6px 10px; border-radius: var(--radius); display: inline-block; }
.item { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.item:last-child { border-bottom: 0; }
.item-actions { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.switch { font-weight: 600; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--text); }
.form .check { flex-direction: row; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--text); }
.form h2 { font-size: 26px; }
.account .profile-head { margin-right: 44px; }
.danger .note { margin-bottom: 4px; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .role-pick { grid-template-columns: 1fr; } }
.role-card { text-align: left; background: var(--bg); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 6px; color: var(--text); }
.role-card strong { font-family: var(--head); font-size: 24px; text-transform: uppercase; letter-spacing: 0.03em; }
.role-card span { font-size: 14px; color: var(--muted); }
.role-card:hover { border-color: var(--accent); background: #fff; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius); font-weight: 600; z-index: 50; box-shadow: var(--shadow); max-width: min(90vw, 480px); text-align: center; }
.toast.is-error { background: #b42318; }
.rate-form + .rate-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
