/* The delivery checklist. Store type and colours, as the Armor builder:
   Rajdhani, charcoal #373737, orange #f89d43, 12px radii. Light only, like
   the store. Phone first: everything is sized for a thumb, and desktop just
   centres the same column. The font is imported here rather than linked in
   the page (see FONTS in lib/pages.mjs). */
@import url("https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&display=swap");
:root {
  color-scheme: light;
  --bg: #ffffff;
  --stage: #eceef0;
  --panel: #f5f4f1;
  --ink: #2f3033;
  --ink-soft: #62666b;
  --line: #e3e0db;
  --charcoal: #373737;
  --orange: #f89d43;
  --orange-ink: #a85a12;
  --orange-wash: #fff6ec;
  --green: #23704f;
  --green-wash: #e9f4ee;
  --red: #b3261e;
  --red-wash: #fcecea;
  --font: "Rajdhani", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --body: -apple-system, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  --r: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--body); font-size: 16px; line-height: 1.5; }
h1, h2, h3, .btn, .seg button, .phases button, .eyebrow, .choice b, .item-title, .act { font-family: var(--font); }
h1 { font-size: 34px; line-height: 1.05; margin: 0 0 10px; font-weight: 700; }
h2 { font-size: 24px; line-height: 1.15; margin: 0 0 8px; font-weight: 700; }
h3 { font-size: 20px; line-height: 1.2; margin: 0 0 6px; font-weight: 700; }
a { color: var(--charcoal); }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
img { max-width: 100%; display: block; }

#app { max-width: 640px; margin: 0 auto; min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
main { padding: 0 16px 40px; }
.seo { padding: 20px 16px; }

/* top */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--charcoal); color: #d9dadc; }
.brand img { height: 32px; width: auto; filter: brightness(0) invert(1); }
.sync { font-size: 13px; text-align: right; }
.sync[data-sync="saved"]::before { content: "● "; color: #6fcf97; }
.sync[data-sync="offline"]::before { content: "● "; color: var(--orange); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 20px; border-radius: var(--r); border: 2px solid var(--charcoal); background: var(--charcoal); color: #fff; font-weight: 700; font-size: 19px; letter-spacing: .02em; text-decoration: none; cursor: pointer; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.big { width: 100%; min-height: 56px; font-size: 21px; }
.btn.ghost { background: transparent; color: var(--charcoal); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 16px; border-width: 1.5px; }
.linkbtn { background: none; border: 0; padding: 6px 0; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 15px; }
.linkbtn.on { color: var(--charcoal); font-weight: 600; }
.linkbtn.danger { color: var(--red); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row .btn { flex: 1 1 140px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 16px 0; }
.card p { margin: 0 0 10px; }
.fine { font-size: 14px; color: var(--ink-soft); margin: 10px 0; }
.center { text-align: center; }
.note { font-size: 15px; background: var(--orange-wash); border-left: 3px solid var(--orange); padding: 8px 10px; border-radius: 6px; margin: 10px 0; }
.err { color: var(--red); font-weight: 600; margin: 10px 0 0; }
.ok { color: var(--green); font-weight: 600; margin: 10px 0 0; }

/* start */
.hero { margin: 0 -16px; background: radial-gradient(120% 90% at 50% 30%, #ffffff 0%, var(--stage) 70%); padding: 8px 0 18px; }
.hero img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-text { padding: 0 16px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: 14px; color: var(--orange-ink); margin: 0 0 4px; }
.hero-text p:last-child { margin: 0; color: var(--ink-soft); }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--charcoal); color: #fff; font-size: 17px; margin-right: 8px; vertical-align: 2px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 12px; border: 2px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { font-size: 19px; line-height: 1.1; }
.choice span { font-size: 13.5px; color: var(--ink-soft); line-height: 1.3; }
.choice.on { border-color: var(--orange); background: var(--orange-wash); box-shadow: 0 0 0 1px var(--orange); }
.choice:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.cta { margin: 20px 0 6px; }
/* a vehicle with no renders yet, and the front page: the hero is text alone */
.hero.plain { padding-top: 22px; }
/* the front page's vehicle cards */
.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick { display: flex; flex-direction: column; justify-content: flex-end; min-height: 64px; border: 2px solid var(--line); border-radius: var(--r); background: #fff; text-decoration: none; color: var(--ink); overflow: hidden; }
.pick img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: radial-gradient(120% 90% at 50% 30%, #ffffff 0%, var(--stage) 70%); }
.pick.plain { justify-content: center; }
.pick-text { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.pick-make { font-size: 13.5px; color: var(--ink-soft); line-height: 1.2; }
.pick-text b { font-family: var(--font); font-size: 21px; line-height: 1.1; }
.pick-text .chip { align-self: flex-start; margin-top: 4px; }
.pick:hover, .pick:focus-visible { border-color: var(--orange); }

/* checklist bar */
.bar { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px 0; }
.bar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.veh { font-size: 15px; min-width: 0; }
.veh b { font-family: var(--font); font-size: 19px; }
.veh span { color: var(--ink-soft); }
.veh .linkbtn { font-size: 14px; padding: 0 0 0 4px; }
.seg { display: inline-flex; flex: none; border: 1.5px solid var(--charcoal); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 6px 12px; font-weight: 700; font-size: 16px; cursor: pointer; min-height: 36px; }
.seg button.on { background: var(--charcoal); color: #fff; }
.progress { height: 6px; background: var(--stage); border-radius: 3px; margin: 10px 0 6px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--orange); transition: width .3s; }
.prog-text { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--ink-soft); }
.t-flag { color: var(--red); }
.phases { display: flex; gap: 6px; overflow-x: auto; margin: 10px -16px 0; padding: 0 16px 10px; scrollbar-width: none; }
.phases::-webkit-scrollbar { display: none; }
.phases button { flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 16px; cursor: pointer; white-space: nowrap; min-height: 38px; }
.phases button small { font-family: var(--body); font-weight: 500; color: var(--ink-soft); font-size: 12.5px; margin-left: 2px; }
.phases button.on { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
.phases button.on small { color: #d9dadc; }
.phases button.complete:not(.on) { border-color: var(--green); }

.due { background: var(--charcoal); color: #fff; padding: 10px 16px; font-size: 15px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.due b { font-family: var(--font); font-size: 20px; color: var(--orange); }
.due a { color: #fff; margin-left: auto; }
.due.soon { background: var(--red); }
.due.soon b { color: #fff; }
.due.over { background: var(--red); }

.phase-intro { padding: 18px 0 2px; }
.phase-intro p { margin: 0; color: var(--ink-soft); }
.sec { font-size: 15px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin: 22px 0 8px; }

/* items */
.item { border: 1.5px solid var(--line); border-radius: var(--r); margin: 8px 0; background: #fff; scroll-margin-top: 150px; }
.item-head { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; padding: 12px; min-height: 56px; cursor: pointer; }
.state { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #c5c7ca; font-weight: 800; font-size: 16px; color: #fff; }
.item-title { flex: 1; font-size: 19px; font-weight: 600; line-height: 1.15; }
.chip { flex: none; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; background: var(--stage); color: var(--ink-soft); }
.chip.crit { background: var(--charcoal); color: #fff; }
.s-pass .state { background: var(--green); border-color: var(--green); }
.s-flag { border-color: var(--red); }
.s-flag .state { background: var(--red); border-color: var(--red); }
.s-later .state { background: var(--orange); border-color: var(--orange); font-size: 13px; }
.s-na .state { background: #9a9da1; border-color: #9a9da1; }
.s-pass:not(.open) .item-title, .s-na:not(.open) .item-title { color: var(--ink-soft); }
.item.open { border-color: var(--charcoal); box-shadow: 0 4px 16px rgba(0, 0, 0, .06); }
.item-body { padding: 0 12px 12px; }
.how { margin: 0 0 10px; }

.where { margin: 10px 0; }
.stage { position: relative; background: radial-gradient(120% 90% at 50% 30%, #ffffff 0%, var(--stage) 75%); border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; }
.stage img { width: 100%; height: 100%; object-fit: cover; }
.layer { position: absolute; background: var(--orange); opacity: .7; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.spot { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--orange); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--orange); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 2px var(--orange), 0 0 0 2px rgba(248, 157, 67, .6); } 100% { box-shadow: 0 0 0 2px var(--orange), 0 0 0 18px rgba(248, 157, 67, 0); } }
@media (prefers-reduced-motion: reduce) { .spot { animation: none; } }
figcaption, .where-label { font-size: 14px; color: var(--ink-soft); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.pin { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); flex: none; }

.acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
.acts.one { grid-template-columns: 1fr; }
.shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.shade polygon { fill: var(--orange); fill-opacity: .55; stroke: var(--orange); stroke-width: 3; }
mark { background: #ffe9a8; color: inherit; font-weight: 700; padding: 0 2px; border-radius: 3px; }
.software { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.software p { margin: 0; }
.software .fine { margin-top: 4px; }
.act { min-height: 52px; border-radius: var(--r); border: 2px solid var(--line); background: #fff; font-weight: 700; font-size: 19px; cursor: pointer; }
.act-pass.on { background: var(--green); border-color: var(--green); color: #fff; }
.act-flag.on { background: var(--red); border-color: var(--red); color: #fff; }
.act-later.on { background: var(--orange); border-color: var(--orange); color: var(--charcoal); }
.item-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; }
.aside { font-size: 15px; margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--ink-soft); }
.aside + .aside { border-top: 0; padding-top: 0; margin-top: 4px; }

.flagbox { background: var(--red-wash); border-radius: 10px; padding: 12px; margin: 10px 0 4px; }
.lbl { display: block; font-weight: 600; font-size: 15px; margin: 8px 0 4px; }
.flagbox .lbl:first-child { margin-top: 0; }
textarea, input[type="email"], input[type="date"], input[type="text"], .sharelink input { width: 100%; border: 1.5px solid #c5c7ca; border-radius: 10px; padding: 10px 12px; background: #fff; font-size: 16px; min-height: 46px; }
textarea { resize: vertical; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { position: relative; width: 84px; height: 84px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; background: var(--stage); }
.thumb button { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: var(--charcoal); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.addphoto { width: 84px; height: 84px; border: 2px dashed var(--red); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--red); cursor: pointer; background: #fff; text-align: center; }
.addphoto input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cam { width: 26px; height: 20px; border: 2.5px solid currentColor; border-radius: 5px; position: relative; }
.cam::after { content: ""; position: absolute; inset: 3px 7px; border: 2.5px solid currentColor; border-radius: 50%; }

.capture form { display: block; }
.capture .btn { width: 100%; margin-top: 12px; }
.capture.done { background: var(--green-wash); border-color: #bfe0cd; }
.started { background: var(--orange-wash); border-color: #f3c79c; }
.perk { display: inline-block; background: var(--orange-wash); border: 1px solid #f3c79c; border-radius: 999px; padding: 3px 12px; font-size: 15px; }
.perk b { color: var(--orange-ink); font-family: var(--font); font-size: 18px; }
.offer { background: var(--orange-wash); border-color: #f3c79c; }
.offer-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pct { font-family: var(--font); font-weight: 700; font-size: 52px; line-height: .9; color: var(--orange-ink); }
.pct-text { font-size: 15px; color: var(--ink-soft); line-height: 1.3; }
.pct-text b { display: block; font-family: var(--font); font-size: 21px; color: var(--ink); line-height: 1.15; }
.btn.wide { width: 100%; margin-top: 10px; }
.tick.small { font-size: 14px; color: var(--ink-soft); margin-top: 14px; }
.tick.small input { width: 18px; height: 18px; }
/* The date field: iPhones size it by its own rules (it overflowed the card)
   and centre the date, so it read as a plain box. Fixed width, date on the
   left, and a calendar icon so it looks like something to tap. Desktop
   Chrome's own picker button sits invisibly over the icon and still works. */
input[type="date"] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%;
  text-align: left; padding-right: 44px; color: var(--ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23373737' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") no-repeat right 12px center / 22px 22px;
}
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0; width: 28px; height: 28px; margin-right: -32px; cursor: pointer; }
.hint { font-weight: 400; color: var(--ink-soft); font-size: 13.5px; margin-left: 4px; }
.sending { margin: 10px 0 0; color: var(--ink-soft); font-weight: 600; }
.tick { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; font-size: 15px; }
.tick input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--charcoal); flex: none; }
.phase-next { margin: 26px 0 8px; }

/* report (in the app and the shared page) */
.report h1, .r-main h1 { margin-top: 8px; }
.r-counts { display: flex; gap: 8px; margin: 10px 0; }
.r-counts span { flex: 1; text-align: center; border-radius: 10px; padding: 8px 4px; font-size: 14px; background: var(--panel); }
.r-counts b { display: block; font-family: var(--font); font-size: 28px; line-height: 1; }
.c-flag b { color: var(--red); }
.c-later b { color: var(--orange-ink); }
.c-pass b { color: var(--green); }
.r-item { border: 1.5px solid var(--line); border-left: 5px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; break-inside: avoid; }
.r-flag { border-left-color: var(--red); }
.r-later { border-left-color: var(--orange); }
.r-item h3 { font-size: 19px; margin: 0; }
.r-meta { font-size: 13.5px; color: var(--ink-soft); margin: 2px 0 0; }
.r-note { margin: 6px 0 0; white-space: pre-wrap; }
.r-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.r-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--stage); }
.r-clean { font-weight: 600; color: var(--green); }
.sharelink input { font-size: 14px; color: var(--ink-soft); }
.shop { background: #fff; }

.report-page { background: #fff; }
.r-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--charcoal); max-width: 760px; margin: 0 auto; }
.r-head .logo { height: 30px; width: auto; filter: brightness(0) invert(1); }
.r-head .btn.ghost { color: #fff; border-color: #fff; }
.r-main { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; }
.r-sub { color: var(--ink-soft); margin: 0 0 4px; font-size: 15px; }
.r-passed { margin: 16px 0; }
.r-passed summary { cursor: pointer; font-weight: 600; }
.r-foot { font-size: 13.5px; color: var(--ink-soft); margin-top: 28px; border-top: 1px solid var(--line); padding-top: 12px; }

/* add to home screen: on the icon's navy so it stands out from the light
   page behind (Pete, 2026-10-17) */
.a2hs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-width: 640px; margin: 0 auto; display: flex; gap: 12px; align-items: flex-start; background: #1f3f50; color: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 34px rgba(0, 0, 0, .35); padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.a2hs.slide { animation: a2hs-up .35s ease-out; }
@keyframes a2hs-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .a2hs.slide { animation: none; } }
.a2hs-icon { flex: none; width: 54px; height: 54px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.a2hs-body { flex: 1; min-width: 0; }
.a2hs-body p { margin: 0 0 8px; font-size: 15px; }
.a2hs-body .fine { color: rgba(255, 255, 255, .78); }
.a2hs-body .row { margin-top: 12px; }
.a2hs-body .btn { min-height: 44px; font-size: 17px; background: var(--orange); border-color: var(--orange); color: var(--charcoal); }
.a2hs-body .btn.ghost { background: transparent; border-color: #fff; color: #fff; }
.share { vertical-align: -4px; color: #8cc8ff; }
dialog { border: 0; border-radius: 16px; padding: 18px; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog .row { margin-top: 14px; }

.proof li { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: var(--panel); }
.proof li.pass { background: var(--green-wash); }
.proof li.fail { background: var(--red-wash); }
.proof li small { display: block; color: var(--ink-soft); }

@media (min-width: 700px) {
  #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .choices { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .choices.two { grid-template-columns: 1fr 1fr; }
}
@media print {
  .noprint, .r-head .btn { display: none !important; }
  .r-head { background: #fff; padding: 0; }
  .r-head .logo { filter: none; }
  .r-passed { display: block; }
  .r-passed[open] summary, .r-passed summary { list-style: none; }
  body { font-size: 12pt; }
}
