* { box-sizing: border-box; }
body { margin: 0; background: #f0f1e9; color: #24281e; font: 15px/1.45 system-ui, sans-serif; }
nav, main { width: min(840px, calc(100% - 32px)); margin-inline: auto; }
nav, nav div { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
nav { justify-content: space-between; padding-block: .9rem; }
nav a, nav button { border-radius: 6px; padding: .5rem .75rem; font: inherit; }
nav a { color: #354a28; }
nav button { border: 1px solid #40532e; background: #40532e; color: #fff; cursor: pointer; }
main { margin-bottom: 1.5rem; border: 1px solid #d5dacb; border-radius: 10px; background: #fff; padding: clamp(1rem, 5vw, 2.4rem); overflow-wrap: anywhere; }
header, section { margin-bottom: 1.2rem; }
header { border-bottom: 1px solid #d5dacb; padding-bottom: .9rem; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { margin: .15rem 0 .4rem; font-size: clamp(1.7rem, 4vw, 2.15rem); line-height: 1.17; }
h2 { margin-bottom: .4rem; font-size: 1.13rem; }
h3 { margin: .55rem 0 .15rem; font-size: .92rem; }
.brand, .muted, footer { color: #505749; }
.brand, .demo-label { font-weight: 650; }
.demo-label { margin-bottom: .6rem; }
dl { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; }
dt, small, footer { font-size: .85em; }
dt { color: #505749; }
dd { font-weight: 650; }
.text { white-space: pre-wrap; }
table { width: 100%; margin-top: .5rem; border-collapse: collapse; table-layout: fixed; }
th, td { padding: .42rem .5rem; border: 1px solid #cbd1c4; text-align: left; vertical-align: top; }
thead th { background: #eef1e8; }
th:first-child { width: 30%; }
.values th:first-child { width: 62%; }
@page demo-report {
  @bottom-center { content: "Демо · учебные данные · BMW FA Reader · " counter(page); font: 9pt system-ui; }
}
@page owner-report {
  @bottom-center { content: "BMW FA Reader · " counter(page); font: 9pt system-ui; }
}
small { display: block; font-weight: 400; }
footer { border-top: 1px solid #d5dacb; padding-top: .55rem; }
@page { size: A4; margin: 13mm 14mm; }
@media print {
  body { background: white; color: black; font-size: 10pt; }
  nav { display: none; }
  body.demo-report { page: demo-report; }
  body.owner-report { page: owner-report; }
  .values :is(th, td) { padding-block: .3rem; }
  main { width: auto; margin: 0; padding: 0; border: 0; border-radius: 0; }
  header, section { margin-bottom: 3.5mm; }
  h1 { font-size: 20pt; }
  h1, h2, h3, thead { break-after: avoid; }
  header, tr { break-inside: avoid; }
  thead th { background: white; }
  p { orphans: 3; widows: 3; }
}
