/* Avenor Rentals demo - plain CSS, system fonts, light and dark. */
:root {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --ink: #12222f;
  --muted: #55667a;
  --line: #dbe3ea;
  --brand: #0f2a3d;
  --brand-ink: #ffffff;
  --accent: #f5b942;
  --accent-ink: #2a1d00;
  --link: #0b5a8a;
  --ok: #1d7a4d;
  --low: #a65f00;
  --out: #b3261e;
  --l3: #cfeedd;
  --l2: #e5f1c8;
  --l1: #ffe4a8;
  --l0: #f6c9c5;
  --l-ink: #12222f;
  --body: #3a6f94;
  --glass: #d5e8f4;
  --tyre: #1d2630;
  --rim: #aeb9c4;
  --trim: #26435a;
  --shadow: rgba(15, 42, 61, .18);
  --radius: 14px;
  --focus: #1368ce;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1620;
    --surface: #132330;
    --ink: #e8eef3;
    --muted: #9db0c0;
    --line: #25394a;
    --brand: #0a1a26;
    --link: #7cc0ee;
    --ok: #5bd69b;
    --low: #f0b24a;
    --out: #ff8f87;
    --l3: #1f5a3f;
    --l2: #4a5a22;
    --l1: #6a4d14;
    --l0: #6b2a27;
    --l-ink: #f2f6f9;
    --body: #5f9ccc;
    --glass: #1a3345;
    --tyre: #060a0e;
    --rim: #6c7b88;
    --trim: #a9c3d8;
    --shadow: rgba(0, 0, 0, .5);
    --focus: #8cc4ff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
a { color: var(--link); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .75em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.demo-bar { background: var(--accent); color: var(--accent-ink); font-size: .9rem; padding: .5rem 16px; display: flex; gap: .25rem .75rem; flex-wrap: wrap; justify-content: center; text-align: center; }
.demo-bar a { color: var(--accent-ink); font-weight: 600; }
.site-header { background: var(--brand); color: var(--brand-ink); display: flex; justify-content: space-between; align-items: center; padding: .7rem 16px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .55rem; color: var(--accent); text-decoration: none; font-size: 1.15rem; }
.brand span { color: #fff; }
.brand b { color: var(--accent); }
.site-header nav { display: flex; gap: 1.1rem; }
.site-header nav a { color: #fff; text-decoration: none; opacity: .9; padding: .25rem 0; }
.site-header nav a:hover { opacity: 1; text-decoration: underline; }

.hero { background: linear-gradient(135deg, var(--brand) 0%, #1c4a6b 100%); color: #fff; padding: 2.5rem 0 3.5rem; }
.hero-grid { display: grid; gap: 2rem; grid-template-columns: 1.1fr .9fr; align-items: center; }
.hero h1 { color: #fff; }
.hero .lead { color: #d8e6f0; font-size: 1.1rem; max-width: 36rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--accent); font-weight: 700; }
.hero-art { display: grid; gap: .5rem; opacity: .95; }
.hero-art .vehicle { width: 100%; height: auto; }
.hero-art .v-body { fill: #f5b942; }
.hero-art .v-glass { fill: #d5e8f4; }
.hero-art .v-trim { fill: #0f2a3d; stroke: #0f2a3d; }
.hero-art .v-tyre { fill: #0a1218; }
.hero-art .v-rim { fill: #b8c4cf; }
.hero-art .v-shadow { fill: rgba(0, 0, 0, .3); }

.card { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: 0 1px 2px var(--shadow); }
.card-title { font-size: 1.05rem; }
.booking { margin-top: 1.25rem; color: var(--ink); }

.range-form { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr auto; align-items: end; }
.range-form .chips, .range-form .hint { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
.range-form .field { margin: 0; min-width: 0; }
.range-form input { min-width: 0; max-width: 100%; }
label, legend { font-weight: 600; font-size: .92rem; }
.input, input[type=date], input[type=text], input[type=email], input[type=tel] { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .65rem .75rem; width: 100%; min-height: 44px; }
.input:focus, input:focus { border-color: var(--focus); }
.hint { color: var(--muted); font-size: .85rem; margin: 0; }
.subtle { color: var(--muted); font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font: inherit; font-size: .85rem; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: .35rem .8rem; cursor: pointer; min-height: 34px; }
.chip:hover { border-color: var(--focus); }

.btn { font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: .7rem 1.2rem; cursor: pointer; min-height: 44px; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(.95); }
.btn-secondary { background: transparent; color: var(--link); border: 2px solid currentColor; }
.btn-disabled, .btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
.btn-wide { width: 100%; }
.hero .btn-secondary { color: #fff; }

.steps { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); margin: -1.6rem auto 2.5rem; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: 0 1px 2px var(--shadow); }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; background: var(--brand); color: var(--accent); border-radius: 50%; font-weight: 700; margin-bottom: .4rem; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }
.demo-explainer { margin-bottom: 3rem; max-width: 760px; }

.page { padding-top: 1.5rem; padding-bottom: 3rem; }
.narrow { max-width: 720px; }
.section-title { margin-top: 1.5rem; }
.back { display: inline-block; margin-bottom: .75rem; }
.loading { color: var(--muted); padding: 2rem 0; }
.alert { padding: .8rem 1rem; border-radius: 10px; border: 1px solid; margin: .75rem 0; }
.alert-error { background: color-mix(in srgb, var(--out) 12%, var(--surface)); border-color: var(--out); color: var(--ink); }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.class-card { display: flex; flex-direction: column; }
.class-card .btn { margin-top: auto; }
.art { background: linear-gradient(180deg, color-mix(in srgb, var(--glass) 55%, var(--surface)), var(--surface)); border-radius: 10px; padding: .6rem .8rem 0; margin-bottom: .75rem; }
.vehicle { width: 100%; height: auto; display: block; }
.v-body { fill: var(--body); }
.v-glass { fill: var(--glass); }
.v-trim { fill: var(--trim); stroke: var(--trim); }
.v-tyre { fill: var(--tyre); }
.v-rim { fill: var(--rim); }
.v-shadow { fill: var(--shadow); }
.class-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.class-head h3 { margin: 0; }
.tag { font-size: .75rem; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .6rem; color: var(--muted); }
.models { color: var(--muted); font-size: .9rem; margin: .25rem 0 .5rem; min-height: 1.4em; }
.price { margin: 0; font-size: 1rem; }
.price strong { font-size: 1.6rem; }
.free { display: flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .92rem; margin: .5rem 0 .9rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; display: inline-block; }
.free-ok { color: var(--ok); } .free-low { color: var(--low); } .free-out { color: var(--out); }

.calendar-card { margin-top: 1.5rem; }
.calendar-card .section-title { margin-top: 0; }
.legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .82rem; color: var(--muted); margin: .5rem 0; }
.legend-item { display: inline-flex; align-items: center; gap: .35rem; }
.swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line); display: inline-block; }
.cal-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.calendar { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .85rem; }
.calendar th, .calendar td { text-align: center; padding: .35rem .3rem; min-width: 38px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.calendar thead th { background: var(--bg); font-weight: 600; line-height: 1.15; }
.calendar th.we { color: var(--muted); }
.calendar .dow { display: block; font-size: .7rem; color: var(--muted); font-weight: 500; }
.calendar .dom { display: block; }
.calendar .mon { display: block; font-size: .65rem; color: var(--link); }
.calendar tbody th, .calendar .corner { position: sticky; left: 0; background: var(--surface); text-align: left; min-width: 96px; padding-left: .6rem; z-index: 1; font-weight: 600; }
.calendar .corner { background: var(--bg); z-index: 2; }
.cell { color: var(--l-ink); font-weight: 700; }
.l3 { background: var(--l3); } .l2 { background: var(--l2); } .l1 { background: var(--l1); } .l0 { background: var(--l0); }

.reserve-grid { display: grid; gap: 1.25rem; grid-template-columns: 1.3fr 1fr; align-items: start; }
.form fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.segmented { display: flex; flex-wrap: wrap; gap: .5rem; }
.segmented legend { width: 100%; margin-bottom: .4rem; }
.seg { flex: 1; min-width: 130px; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; border: 2px solid var(--line); border-radius: 10px; padding: .6rem; font-weight: 700; }
.seg input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, var(--surface)); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.company-fields[hidden] { display: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin: .5rem 0 1rem; }
.check input { margin-top: .3rem; width: 20px; height: 20px; flex: none; }
.check label { font-weight: 400; font-size: .9rem; }
.summary h2 { margin-bottom: .1rem; }
.summary dl, .facts { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: .75rem 0; }
dt { color: var(--muted); font-size: .9rem; }
dd { margin: 0; font-weight: 600; text-align: right; }
.facts dd { text-align: left; }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: .7rem; font-size: 1.1rem; }
.total strong { font-size: 1.6rem; }

.confirm { text-align: center; }
.confirm .facts { text-align: left; max-width: 28rem; margin-left: auto; margin-right: auto; }
.confirm .art { max-width: 340px; margin: 1rem auto; }
.check-badge { width: 56px; height: 56px; margin: 0 auto .75rem; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 1.8rem; }
.copy-row { display: flex; gap: .5rem; max-width: 34rem; margin: .25rem auto; }
.label-sm { display: block; margin-top: 1rem; font-size: .85rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.25rem; }

.site-footer { background: var(--brand); color: #c9d8e4; padding: 1.5rem 0 2rem; font-size: .9rem; }
.site-footer a { color: var(--accent); }
.site-footer .small { opacity: .8; font-size: .8rem; }

@media (max-width: 800px) {
  .hero-grid, .reserve-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .steps { grid-template-columns: 1fr; margin-top: -1.2rem; }
  .range-form { grid-template-columns: 1fr 1fr; }
  .range-form .btn { grid-column: 1 / -1; }
  .site-header { flex-wrap: wrap; }
  .copy-row { flex-direction: column; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .chip { transition: filter .15s, border-color .15s; }
}

/* ---- v2: branches, trip summary, specs, payment, receipt ---- */
.demo-bar { background: var(--accent); color: var(--accent-ink); }
.branch-field select, .branch-field input[type=search] { margin-bottom: .35rem; }
.branch-field .input { background: var(--bg); }
.branch-info { min-height: 1.3em; }
.return-box[hidden] { display: none; }
.dates { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr; }
.search-form { display: grid; gap: .6rem; }
.search-form .field { margin-bottom: .3rem; }
.check.inline { margin: .1rem 0; }
.check.inline label { font-weight: 500; }
input[type=search], select.input { font: inherit; color: var(--ink); }
select.input { appearance: auto; }
.branch-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: .5rem; }
.branch h3 { margin-bottom: .15rem; }
.branch .hours { font-size: .85rem; color: var(--muted); margin: 0; }
.branches-list { margin-bottom: 3rem; }
.trip { margin-bottom: 1rem; }
.trip-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.trip h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .2rem; }
.trip p { margin: 0 0 .2rem; }
.strong { font-weight: 700; }
.who { margin: 0 0 .4rem; font-size: .95rem; }
.specs { list-style: none; padding: 0; margin: 0 0 .6rem; display: flex; flex-wrap: wrap; gap: .3rem .4rem; }
.specs li { font-size: .78rem; border: 1px solid var(--line); border-radius: 999px; padding: .1rem .6rem; color: var(--muted); background: var(--bg); }
.total-line { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: .5rem; margin: .4rem 0 0; }
.total-line strong { font-size: 1.3rem; }
details.calendar-card { margin-top: 1.5rem; }
details.calendar-card summary { cursor: pointer; font-weight: 700; }
.alert-info { background: color-mix(in srgb, var(--link) 10%, var(--surface)); border-color: var(--link); color: var(--ink); }
.badge { width: 56px; height: 56px; margin: 0 auto .75rem; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 1.8rem; }
.badge-ok { background: var(--ok); } .badge-wait { background: var(--low); } .badge-no { background: var(--out); }
.refno { display: flex; flex-direction: column; align-items: center; margin: 1rem 0 .25rem; }
.refno span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.refno strong { font-size: 1.6rem; letter-spacing: .06em; }
.next { text-align: left; max-width: 28rem; margin: 1rem auto; }
.next ol { padding-left: 1.2rem; margin: 0; }
.next li { margin-bottom: .3rem; }
.behind { text-align: left; max-width: 34rem; margin: 1rem auto 0; font-size: .92rem; }
.behind summary { cursor: pointer; color: var(--link); font-weight: 600; }
.pay { text-align: left; max-width: 34rem; margin: 1.25rem auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: var(--bg); }
.pay h2 { margin-bottom: .25rem; }
.practice-note { font-size: .88rem; color: var(--muted); }
.testcards { display: grid; gap: .5rem; margin-top: .5rem; }
.testcard { font: inherit; display: flex; justify-content: space-between; align-items: center; gap: .75rem; width: 100%; min-height: 48px; text-align: left; border: 2px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: .6rem .9rem; cursor: pointer; }
.testcard:hover:not(:disabled) { border-color: var(--focus); }
.testcard:disabled { opacity: .55; cursor: progress; }
.tc-brand { font-weight: 700; }
.tc-hint { font-size: .8rem; border-radius: 999px; padding: .1rem .6rem; border: 1px solid currentColor; }
.tc-ok { color: var(--ok); } .tc-no { color: var(--out); } .tc-check { color: var(--low); }
.paid-note { margin-bottom: 1rem; }
.receipt-page { max-width: 760px; }
.invoice { position: relative; overflow: hidden; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 1px 2px var(--shadow); }
.watermark { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(6rem, 24vw, 12rem); font-weight: 900; letter-spacing: .1em; color: var(--out); opacity: .08; transform: rotate(-24deg); pointer-events: none; user-select: none; }
.inv-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.inv-head h2 { margin-bottom: 0; }
.inv-meta p { margin: 0; text-align: right; }
.demo-ribbon { background: color-mix(in srgb, var(--out) 12%, var(--surface)); border: 1px dashed var(--out); border-radius: 8px; padding: .4rem .7rem; font-weight: 700; font-size: .85rem; margin: 1rem 0; }
.inv-facts { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 0 0 1rem; }
.inv-facts dd { text-align: left; }
.inv-table { width: 100%; border-collapse: collapse; position: relative; }
.inv-table th, .inv-table td { padding: .5rem .4rem; border-bottom: 1px solid var(--line); text-align: left; }
.inv-table .num { text-align: right; white-space: nowrap; }
.inv-table tfoot td { border-bottom: 0; color: var(--muted); }
.inv-table tfoot .grand td { color: var(--ink); font-weight: 800; font-size: 1.15rem; border-top: 2px solid var(--ink); }
.paid-with { margin: 1rem 0 .5rem; position: relative; }
.deposit-box { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; background: var(--bg); margin-top: .75rem; }
.deposit-box p { margin: .2rem 0 0; }
@media (max-width: 800px) {
  .dates, .trip-grid { grid-template-columns: 1fr 1fr; }
  .inv-meta p { text-align: left; }
}
@media (max-width: 420px) {
  .dates, .trip-grid { grid-template-columns: 1fr; }
}
@media print {
  .demo-bar, .site-header, .site-footer, .no-print, .skip, .paid-note { display: none !important; }
  body { background: #fff; color: #000; }
  .invoice { box-shadow: none; border: 1px solid #999; }
}
