/* CarBachat — by Himanshu Drive */
:root {
  --blue: #1f52d6;
  --navy: #10298a;
  --ink: #14204a;
  --muted: #55607e;
  --line: #d8deec;
  --page: #eef2fa;
  --paper: #ffffff;
  --yellow: #ffd100;
  --green: #138a43;
  --green-bg: #e6f5ec;
  --red: #c8302a;
  --red-bg: #fdecea;
  --amber: #a35f00;
  --amber-bg: #fff3d6;
  --radius: 14px;
  --font: "Mukta", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(30px, 6vw, 44px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 24px; font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top { background: var(--navy); color: #fff; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand img { height: 44px; width: auto; }
.brand b { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; display: block; line-height: 1; }
.brand b span { color: var(--yellow); }
.brand small { display: block; font-size: 13px; color: #c7d2f4; line-height: 1.3; margin-top: 2px; }
.top nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; padding: 8px 12px; border: 1.5px solid rgba(255,255,255,.35); border-radius: 10px; }
.top nav a:hover { border-color: var(--yellow); }

/* Home hero */
.hero { background: var(--navy); color: #fff; padding: 28px 0 40px; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero p { color: #d6def7; max-width: 46ch; font-size: 19px; }
.hero .road { height: 10px; margin-top: 24px; background: repeating-linear-gradient(90deg, var(--yellow) 0 36px, transparent 36px 60px); border-radius: 4px; opacity: .9; }

/* Tool list on home */
.group { margin: 28px 0; }
.group > p { color: var(--muted); margin-bottom: 12px; }
.tools { list-style: none; margin: 0; padding: 0; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); }
.tools li + li { border-top: 1px solid var(--line); }
.tools a { display: flex; align-items: center; gap: 14px; padding: 16px; text-decoration: none; color: var(--ink); }
.tools a:hover { background: #f6f8fe; }
.tools .ic { flex: 0 0 44px; height: 44px; border-radius: 12px; background: #e7edfc; color: var(--blue); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.tools .t { flex: 1; }
.tools .t b { display: block; font-size: 19px; }
.tools .t span { display: block; font-size: 15px; color: var(--muted); line-height: 1.35; }
.tools .go { color: var(--blue); font-size: 22px; font-weight: 700; }
.tools .t .badge { display: inline-block; width: auto; line-height: 1.5; }
.tools .badge { font-size: 12px; font-weight: 700; background: var(--yellow); color: var(--ink); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }

/* Tool page */
.crumb { font-size: 15px; margin: 18px 0 6px; }
.crumb a { text-decoration: none; font-weight: 600; }
.intro { color: var(--muted); font-size: 18px; max-width: 58ch; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin: 18px 0; }
.panel h2 { font-size: 20px; }
.grid { display: grid; gap: 14px; }
@media (min-width: 620px) { .grid.two { grid-template-columns: 1fr 1fr; } }
label.f { display: block; }
label.f > span { display: block; font-weight: 700; font-size: 16px; margin-bottom: 4px; }
label.f em { font-style: normal; display: block; font-size: 14px; color: var(--muted); margin-top: 3px; min-height: 1em; }
.inp { position: relative; }
.inp i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-weight: 700; pointer-events: none; }
.inp i.u { left: auto; right: 12px; font-weight: 600; font-size: 15px; }
input[type=text], input[type=number], select {
  width: 100%; font: inherit; font-size: 19px; color: var(--ink);
  padding: 11px 12px; min-height: 50px;
  border: 1.5px solid #b9c3dc; border-radius: 10px; background: #fff;
}
.inp.rs input { padding-left: 30px; }
.inp.unit input { padding-right: 64px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(31,82,214,.18); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 9px 14px; border: 1.5px solid #b9c3dc; border-radius: 999px; font-weight: 600; font-size: 16px; background: #fff; }
.seg input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }
.fieldset-title { font-weight: 700; font-size: 16px; margin-bottom: 6px; display: block; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 800; font-size: 19px; border: 0; border-radius: 12px; padding: 13px 22px; min-height: 52px; cursor: pointer; text-decoration: none; }
.btn.main { background: var(--yellow); color: var(--ink); width: 100%; }
.btn.main:hover { filter: brightness(.96); }
.btn.ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.btn.wa { background: #1f9d55; color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.note { font-size: 15px; color: var(--muted); }
details.more { margin-top: 6px; }
details.more summary { cursor: pointer; font-weight: 700; color: var(--blue); font-size: 16px; padding: 6px 0; }
.hide { display: none !important; }

/* The bill — the signature element */
.bill {
  position: relative; background: #fff; margin: 22px 0; padding: 22px 18px 18px;
  border-radius: 4px 4px var(--radius) var(--radius);
  box-shadow: 0 1px 0 var(--line), 0 10px 24px -18px rgba(16,41,138,.45);
}
.bill::before {
  content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 10px;
  background: radial-gradient(circle at 8px 0, transparent 7px, #fff 7.5px) 0 0 / 16px 10px repeat-x;
}
.bill-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 2px dashed var(--line); padding-bottom: 12px; margin-bottom: 8px; }
.bill-head h2 { margin: 0; font-size: 21px; }
.bill-head p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.stamp {
  flex: 0 0 auto; transform: rotate(-8deg); border: 3px solid currentColor; border-radius: 8px;
  padding: 2px 10px; font-weight: 800; font-size: 20px; letter-spacing: .04em; line-height: 1.3;
  text-align: center;
}
.stamp small { display: block; font-size: 11px; letter-spacing: 0; font-weight: 700; }
.stamp.ok { color: var(--green); }
.stamp.warn { color: var(--amber); }
.stamp.bad { color: var(--red); }
.rows { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rows td { padding: 9px 0; vertical-align: top; border-bottom: 1px dotted #cfd6e6; font-size: 17px; }
.rows td.v { text-align: right; white-space: nowrap; font-weight: 700; padding-left: 12px; }
.rows td small { display: block; color: var(--muted); font-size: 14px; line-height: 1.35; font-weight: 400; white-space: normal; }
.rows tr.sub td { color: var(--muted); }
.rows tr.total td { border-bottom: 0; border-top: 2px solid var(--ink); font-size: 21px; font-weight: 800; padding-top: 12px; }
.rows th { text-align: left; font-size: 14px; color: var(--muted); font-weight: 700; padding: 4px 0; border-bottom: 1px solid var(--line); }
.rows th.v { text-align: right; }
.pill { display: inline-block; font-size: 13px; font-weight: 800; border-radius: 6px; padding: 0 7px; margin-left: 4px; vertical-align: 1px; }
.pill.ok { background: var(--green-bg); color: var(--green); }
.pill.warn { background: var(--amber-bg); color: var(--amber); }
.pill.bad { background: var(--red-bg); color: var(--red); }
.big { font-size: clamp(34px, 9vw, 48px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.big-label { color: var(--muted); font-size: 16px; margin-top: 4px; }
.save { background: var(--green-bg); color: var(--green); border-radius: 10px; padding: 12px 14px; margin-top: 14px; font-weight: 700; }
.save.bad { background: var(--red-bg); color: var(--red); }
.tips { margin: 14px 0 0; padding-left: 20px; }
.tips li { margin-bottom: 8px; font-size: 16px; }
.compare { display: grid; gap: 12px; }
@media (min-width: 620px) { .compare.c2 { grid-template-columns: 1fr 1fr; } .compare.c3 { grid-template-columns: 1fr 1fr 1fr; } }
.opt { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; }
.opt.win { border-color: var(--green); background: #f6fcf8; }
.opt h3 { font-size: 17px; margin-bottom: 6px; }

/* Content pages */
.prose { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; margin: 18px 0 28px; }
.prose h2 { font-size: 21px; margin-top: 1.2em; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin-bottom: 6px; }

/* Footer */
.foot { background: #0b1d63; color: #c7d2f4; margin-top: 40px; padding: 26px 0 34px; font-size: 15px; }
.foot a { color: #fff; }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.foot p { margin: 0 0 8px; }

@media (prefers-reduced-motion: no-preference) {
  .bill.show { animation: print .45s ease-out; }
  @keyframes print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
}
@media print {
  .top, .foot, .panel, .actions, .crumb { display: none !important; }
  body { background: #fff; }
}

/* Car comparison */
.slots { display: grid; gap: 12px; }
@media (min-width: 620px) { .slots { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); } }
.slot { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 12px; background: #fbfcff; align-content: start; }
.slot h3 { margin: 0; font-size: 18px; display: flex; justify-content: space-between; align-items: center; }
.slot .x { font: inherit; font-size: 15px; font-weight: 700; background: none; border: 0; color: var(--blue); cursor: pointer; padding: 4px 2px; }
.slot select:disabled { color: var(--muted); background-color: #f3f5fa; }
.btn.add { background: #fff; color: var(--navy); border: 1.5px dashed var(--navy); width: 100%; margin-top: 12px; min-height: 48px; font-size: 17px; }
.cmp-wrap { margin: 4px 0 6px; }
table.cmp { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.cmp thead th { text-align: left; vertical-align: bottom; padding: 6px 8px 10px 0; border-bottom: 2px solid var(--ink); font-size: 18px; line-height: 1.2; }
.cmp thead th b { display: block; font-weight: 800; }
.cmp thead th small { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.cmp tr.sec th { text-align: left; font-size: 17px; font-weight: 800; padding: 18px 0 2px; color: var(--navy); }
.cmp tr.lab th { text-align: left; font-size: 14px; font-weight: 600; color: var(--muted); padding: 9px 0 0; }
.cmp tr.val td { padding: 1px 8px 9px 0; font-size: 17px; font-weight: 700; vertical-align: top; border-bottom: 1px dotted #cfd6e6; overflow-wrap: break-word; }
.cmp.n3 tr.val td { font-size: 16px; }
.cmp td small { display: block; font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.cmp td small.tag { color: var(--green); font-weight: 800; }
.cmp td.best { color: var(--green); }
.cmp td.na { color: var(--muted); font-weight: 600; }
.cmp tr.tot td { font-size: 20px; font-weight: 800; border-bottom: 0; }
.cmp tr.tot td { white-space: nowrap; }
.cmp.n3 tr.tot td { font-size: clamp(15px, 4.2vw, 19px); }
.cmp.n3 tr.tot td small { white-space: normal; }
.cmp tr.lab.tot th { border-top: 2px solid var(--ink); padding-top: 10px; color: var(--ink); font-weight: 800; font-size: 15px; }
.src-h { font-size: 16px; margin: 18px 0 6px; }
.src { margin: 0; padding-left: 20px; font-size: 14px; color: var(--muted); }
.src li { margin-bottom: 6px; }
