:root { --ink:#14181f; --muted:#5b6472; --accent:#0b4f9c; --bg:#f4f6f9; --line:#d5dae2; }
* { box-sizing:border-box; }
body { margin:0; font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif; color:var(--ink); background:var(--bg); line-height:1.55; }
.wrap { max-width:960px; margin:0 auto; padding:0 18px; }
a { color:var(--accent); }

/* Header */
.site-header { background:#fff; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:20; }
.nav { display:flex; align-items:center; justify-content:space-between; height:56px; }
.brand { font-weight:700; font-size:18px; color:var(--ink); text-decoration:none; }
nav a { margin-left:6px; padding:8px 14px; border-radius:6px; text-decoration:none; color:var(--ink); font-weight:600; }
nav a:hover { background:#eef2f7; }
nav a.active { background:var(--accent); color:#fff; }

/* Home */
.hero { background:linear-gradient(180deg,#e8f0fa,#f4f6f9); padding:48px 0 28px; text-align:center; }
.hero h1 { font-size:clamp(26px,5vw,40px); line-height:1.15; margin:0 0 14px; }
.lead { font-size:18px; color:#2b3441; max-width:680px; margin:0 auto 18px; }
.cta { display:inline-block; background:var(--accent); color:#fff; padding:12px 26px; border-radius:8px; font-weight:700; text-decoration:none; }
.cta:hover { background:#093f7d; }
.small { font-size:13px; color:var(--muted); }
main > section.wrap { padding-top:10px; padding-bottom:30px; }
h2 { margin:34px 0 10px; font-size:24px; }
.steps li { margin-bottom:10px; }
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:14px; }
.card { background:#fff; border:1px solid var(--line); border-radius:10px; padding:14px 16px; }
.card h3 { margin:0 0 6px; font-size:16px; }
.card p { margin:0; font-size:14.5px; color:#2b3441; }
details { background:#fff; border:1px solid var(--line); border-radius:8px; padding:10px 14px; margin-bottom:8px; }
summary { cursor:pointer; font-weight:600; }
.center { text-align:center; }
.site-footer { border-top:1px solid var(--line); background:#fff; padding:18px 0; font-size:13px; color:var(--muted); text-align:center; }

/* Form page */
.app { padding:18px 0 40px; }
.actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom:14px; }
.bottom-actions { margin-top:16px; }
.privacy { font-size:13px; color:var(--muted); margin-left:auto; }
button { font:inherit; font-size:14px; padding:9px 16px; border-radius:7px; border:1px solid #8b94a3; background:#fff; cursor:pointer; }
button:hover { background:#eef2f7; }
button.primary { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:700; }
button.primary:hover { background:#093f7d; }
button.danger { color:#b00020; border-color:#b00020; }
.panel { background:#fff; border:1px solid var(--line); border-radius:10px; padding:6px 18px 16px; margin-bottom:14px; }
.panel h2 { font-size:18px; margin:12px 0 10px; }
.fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:12px 16px; }
.fields.two { grid-template-columns:repeat(auto-fit,minmax(200px,260px)); }
label { display:block; font-size:13px; font-weight:600; color:#2b3441; }
input[type=text], textarea { display:block; width:100%; margin-top:4px; font:inherit; font-size:15px; padding:8px 10px; border:1px solid #b9c1ce; border-radius:6px; background:#fff; }
input[type=text]:focus, textarea:focus { outline:2px solid #7fb0ea; border-color:var(--accent); }
.hint { font-size:13px; color:var(--muted); margin:2px 0 10px; }
.quick { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-bottom:10px; font-size:13px; }
.quick button { padding:5px 10px; font-size:13px; border-radius:999px; }
.rows .row-e { display:grid; grid-template-columns:170px 1fr 36px; gap:8px; margin-bottom:6px; }
.rows .row-e input { margin-top:0; }
.rows .row-e button { padding:0; color:#b00020; }
.check { display:flex; gap:8px; align-items:center; font-weight:500; margin-top:10px; }
.bulk { margin-top:8px; }
code { background:#eef2f7; padding:1px 5px; border-radius:4px; }

/* Printed sheets: hidden on screen unless previewing */
#sheets { display:none; }
body.preview #sheets { display:block; background:#e0e4ea; padding:16px 0; }
body.preview .sheet { margin:0 auto 16px; box-shadow:0 2px 8px rgba(0,0,0,.3); }

.sheet { background:#fff; color:#000; font-family:Arial,Helvetica,sans-serif; width:10.5in; height:8in; padding:.15in .2in; position:relative; overflow:hidden; }
.sheet .title { text-align:center; line-height:1; margin-bottom:.06in; }
.sheet .t1 { font-size:26px; letter-spacing:4px; }
.sheet .t2 { font-size:28px; font-family:Georgia,"Times New Roman",serif; font-weight:bold; }
.sheet .pageno { position:absolute; top:.2in; left:.25in; font-size:12px; }
.sheet .layout { display:grid; grid-template-columns:1fr 2.3in; gap:.15in; }
.sheet .layout.single { grid-template-columns:1fr; }
.sheet .grid { display:grid; grid-template-columns:repeat(6,1fr); border:2.5px solid #000; }
.sheet .cell { border:1.5px solid #000; height:.69in; display:flex; flex-direction:column; min-width:0; overflow:hidden; }
.sheet .lab { display:flex; align-items:center; border:1.5px solid #000; border-radius:4px; margin:2px; height:.2in; font-size:10px; }
.sheet .lab b { font-size:9px; letter-spacing:1px; padding:0 4px; }
.sheet .ev { font-size:9px; line-height:1.15; padding:1px 4px; overflow:hidden; }
.sheet .box { border:4px solid #000; margin-bottom:.12in; padding:4px 6px; }
.sheet .box h3 { margin:0 0 2px; text-align:center; font-family:Georgia,serif; font-size:11px; letter-spacing:1.5px; }
.sheet .rw { display:flex; align-items:flex-end; border-bottom:1px solid #000; height:.27in; gap:5px; font-size:11px; overflow:hidden; white-space:nowrap; }
.sheet .rw .cb { width:13px; height:13px; border:1px solid #000; flex:none; margin-bottom:3px; }
.sheet .rw .lb { padding-bottom:2px; }
.sheet .rw .val { font-size:11.5px; padding-bottom:1px; overflow:hidden; text-overflow:clip; }
.sheet .bottom { display:grid; grid-template-columns:4.4in 1fr; gap:.3in; margin-top:.12in; align-items:start; }
.sheet .notes { border:2px solid #000; border-radius:10px; height:1.4in; padding:4px 8px; overflow:hidden; }
.sheet .notes .nl { font-size:13px; letter-spacing:1px; }
.sheet .notes .nt { font-size:10.5px; white-space:pre-wrap; line-height:1.25; }
.sheet .dates { border-left:6px solid #000; border-right:6px solid #000; border-radius:6px; width:2.7in; margin:0 auto; text-align:center; padding:6px 4px; font-size:13px; }
.sheet .dates .dl { display:flex; justify-content:center; align-items:flex-end; gap:4px; height:.28in; margin:2px 0; }
.sheet .dates .dl span.seg { display:inline-block; min-width:.5in; border-bottom:1px solid #000; font-size:13px; text-align:center; }
.sheet .dates .dl span.seg.y { min-width:.65in; }
.sheet .ro { border-left:6px solid #000; border-right:6px solid #000; padding:6px 10px; width:2.6in; margin-left:auto; font-size:15px; }
.sheet .ro .roval { display:inline-block; min-width:1.2in; border-bottom:1px solid #000; font-size:14px; }
.sheet .ro .pg { font-size:12px; margin-top:4px; }
.sheet .ro .pg span { display:inline-block; min-width:.4in; border-bottom:1px solid #000; text-align:center; }

@page { size:letter landscape; margin:.25in; }
@media print {
  body { background:#fff; }
  .site-header, .app, .site-footer { display:none !important; }
  #sheets { display:block !important; background:none !important; padding:0 !important; }
  .sheet { margin:0 !important; box-shadow:none !important; width:100%; height:7.95in; break-after:page; page-break-after:always; }
  .sheet:last-child { break-after:auto; page-break-after:auto; }
  * { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}

@media (max-width:600px) {
  .rows .row-e { grid-template-columns:150px 1fr 34px; }
  .privacy { margin-left:0; width:100%; }
}

/* ---- v2 additions: selects, dates, status, parts cards ---- */
select, input[type=date] { display:block; width:100%; margin-top:4px; font:inherit; font-size:15px; padding:8px 10px; border:1px solid #b9c1ce; border-radius:6px; background:#fff; }
select:focus, input[type=date]:focus { outline:2px solid #7fb0ea; border-color:var(--accent); }
.status { font-size:13px; color:var(--muted); min-height:1.2em; margin:8px 0 0; }
.status.err { color:#b00020; }
.status.ok { color:#1b6e3a; }
.parts-list { margin-top:12px; display:grid; gap:10px; }
.part-card { border:1px solid var(--line); border-radius:8px; padding:8px 14px 14px; background:#fafbfd; }
.part-card h3 { margin:4px 0 8px; font-size:14px; }
#vin { text-transform:uppercase; }

/* printed form: rows that may wrap when several parts/dates are listed */
.sheet .rw.wrapok { height:auto; min-height:.27in; white-space:normal; }
.sheet .rw.wrapok .val { white-space:normal; line-height:1.1; padding-top:2px; }
.sheet .rw .val.sm { font-size:9px; }

/* ---- v2 layout fixes (found in print render) ---- */
.sheet .grid { grid-auto-rows:1fr; }
.sheet .cell { height:auto; min-height:.69in; }
.sheet .layout.single .grid { grid-auto-rows:.88in; }
.sheet .rw .lb { white-space:nowrap; flex:none; }
.sheet .rw .val { min-width:0; }
