/* HomeCheck — PDF report (A4). Same tokens as the site; print-first.
   Rule of the layout: page 1 answers "buy or not", every next page
   answers one question with one number in focus. */

:root {
  --ink: #0B2545; --ink-2: #2F4566; --muted: #667892; --line: #E2E9F3; --line-2: #CFDBEA;
  --soft: #F4F8FE; --brand: #1F7AEF; --brand-600: #1462CC; --brand-300: #7DB6FF; --brand-50: #EEF5FF;
  --navy: #0B2545; --navy-900: #061831;
  --green: #139A63; --green-50: #E7F7EF; --amber: #E8930C; --amber-50: #FFF4E0; --red: #DC3F45; --red-50: #FDECEC;
  --font: "Inter", "Segoe UI", Arial, sans-serif; --display: "Manrope", "Inter", Arial, sans-serif;
}
@page { size: A4; margin: 0; }
* { box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
html, body { margin: 0; }
body { background: #E9EEF5; color: var(--ink); font: 400 10pt/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.num { font-variant-numeric: tabular-nums; }
.i { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Screen toolbar */
.toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); font-size: 14px; }
.toolbar a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--ink); }
.toolbar .dl { padding: 10px 16px; border-radius: 10px; background: var(--brand); color: #fff; }
.toolbar .note { color: var(--muted); }
.toolbar .i { width: 16px; height: 16px; }
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo__mark { width: 22px; height: 22px; }
.logo__word { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: -.045em; color: var(--ink); }
.logo__word b { color: var(--brand); }

/* Page */
.page { position: relative; width: 210mm; height: 297mm; margin: 24px auto; padding: 14mm 14mm 18mm; background: #fff; box-shadow: 0 10px 40px rgba(11,37,69,.12); overflow: hidden; display: flex; flex-direction: column; }
.page + .page { page-break-before: always; }
@media print {
  body { background: #fff; }
  .toolbar { display: none; }
  .page { margin: 0; box-shadow: none; }
}
.p-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 5mm; margin-bottom: 7mm; border-bottom: 1px solid var(--line); font-size: 8pt; color: var(--muted); }
.p-head b { color: var(--ink); font-weight: 600; }
.p-foot { position: absolute; left: 14mm; right: 14mm; bottom: 8mm; display: flex; justify-content: space-between; gap: 10mm; padding-top: 3mm; border-top: 1px solid var(--line); font-size: 7pt; color: var(--muted); }

/* Section heading */
.sec { margin-bottom: 7mm; }
.sec__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4mm; }
.sec__num { font: 800 9pt var(--display); color: var(--brand); letter-spacing: .02em; }
.sec__head h2 { font-size: 16pt; }
.sec__head .tag { margin-left: auto; }
.sec__lead { font-size: 10pt; color: var(--ink-2); margin: -1mm 0 4mm; max-width: 150mm; }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 8pt; font-weight: 600; white-space: nowrap; background: var(--soft); color: var(--ink-2); }
.tag--green { background: var(--green-50); color: var(--green); }
.tag--amber { background: var(--amber-50); color: #A86400; }
.tag--red { background: var(--red-50); color: var(--red); }
.tag--blue { background: var(--brand-50); color: var(--brand-600); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; flex: none; }
.dot--amber { background: var(--amber); } .dot--red { background: var(--red); } .dot--blue { background: var(--brand); }

/* Cover */
.cover-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 9mm; }
.cover-top .logo__mark { width: 30px; height: 30px; }
.cover-top .logo__word { font-size: 22px; }
.cover-meta { text-align: right; font-size: 8pt; color: var(--muted); line-height: 1.6; }
.cover-meta b { color: var(--ink); font-weight: 600; }
.eyebrow { font-size: 8pt; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-600); margin-bottom: 3mm; }
.addr { font-size: 25pt; letter-spacing: -.035em; }
.params { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4mm; }
.params span { padding: 4px 10px; border-radius: 8px; background: var(--soft); font-size: 9pt; color: var(--ink-2); }
.params span b { color: var(--ink); }

.verdict { margin-top: 8mm; display: grid; grid-template-columns: 1fr 58mm; border-radius: 14px; overflow: hidden; border: 1px solid #F6D9A4; }
.verdict__main { padding: 6mm 7mm; background: var(--amber-50); }
.verdict__label { font-size: 8pt; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #A86400; }
.verdict__main h2 { margin-top: 2mm; font-size: 20pt; color: #5E3A00; letter-spacing: -.03em; }
.verdict__main p { margin-top: 3mm; font-size: 10pt; line-height: 1.55; color: #6B4A12; }
.verdict__side { padding: 6mm; background: var(--navy); color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 1mm; }
.verdict__side small { font-size: 8pt; color: #9FB3CF; }
.verdict__side b { font: 800 17pt var(--display); letter-spacing: -.03em; }
.verdict__side b + small { margin-top: 3mm; }
.verdict__side .save { color: #8FE3BC; }

.score { margin-top: 7mm; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; }
.score__item { padding: 4mm 4.5mm; border: 1px solid var(--line); border-radius: 12px; }
.score__item small { display: flex; align-items: center; gap: 6px; font-size: 8pt; color: var(--muted); }
.score__item b { display: block; margin-top: 2mm; font: 800 13pt var(--display); letter-spacing: -.02em; }
.score__item span { display: block; margin-top: 1mm; font-size: 8pt; color: var(--muted); }
.score__item .i { color: var(--brand); }

.legend-row { margin-top: 5mm; display: flex; gap: 6mm; font-size: 8pt; color: var(--muted); }
.legend-row span { display: inline-flex; align-items: center; gap: 5px; }

.disclaimer { margin-top: auto; padding: 4mm 5mm; border-radius: 10px; background: var(--soft); font-size: 7.5pt; color: var(--muted); line-height: 1.5; display: flex; gap: 8px; }
.disclaimer .i { color: var(--muted); margin-top: 1px; }
.disclaimer b { color: var(--ink-2); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; }
.kpi { padding: 4mm 4.5mm; border-radius: 12px; background: var(--soft); }
.kpi small { display: block; font-size: 8pt; color: var(--muted); }
.kpi b { display: block; margin-top: 1.5mm; font: 800 15pt var(--display); letter-spacing: -.02em; }
.kpi span { display: block; font-size: 7.5pt; color: var(--muted); margin-top: 1mm; }
.kpi--accent { background: var(--amber-50); }
.kpi--accent b { color: #A86400; }
.kpi--good b { color: var(--green); }

.gauge { margin-top: 5mm; }
.gauge__track { position: relative; height: 8px; border-radius: 5px; background: linear-gradient(90deg, var(--green) 0%, #9ED9B9 35%, #F5D38F 65%, var(--red) 100%); }
.gauge__mark { position: absolute; top: -5px; width: 3px; height: 18px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 2px #fff; }
.gauge__mark::after { content: attr(data-label); position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-size: 7.5pt; font-weight: 700; white-space: nowrap; }
.gauge__labels { display: flex; justify-content: space-between; margin-top: 2mm; font-size: 7.5pt; color: var(--muted); }

.chart { margin-top: 5mm; padding: 4mm; border: 1px solid var(--line); border-radius: 12px; }
.chart__head { display: flex; justify-content: space-between; align-items: center; font-size: 8pt; color: var(--muted); margin-bottom: 2mm; }
.chart__head b { color: var(--ink); font-size: 9pt; }
.chart svg { width: 100%; height: auto; display: block; }
.chart__legend { display: flex; gap: 12px; }
.chart__legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart__legend i { width: 9px; height: 9px; border-radius: 2px; background: var(--brand-300); display: inline-block; }
.chart__legend i.line { height: 2px; background: var(--amber); }
.chart__legend i.med { height: 2px; background: var(--ink); }

/* Timeline */
.timeline { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; margin-top: 2mm; }
.timeline::before { content: ""; position: absolute; left: 6px; right: 6px; top: 6px; height: 2px; background: var(--line-2); }
.tl { position: relative; padding-top: 7mm; }
.tl::before { content: ""; position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); }
.tl--now::before { border-color: var(--amber); }
.tl small { font-size: 8pt; color: var(--muted); }
.tl b { display: block; font-size: 10pt; margin-top: 1mm; }
.tl span { display: block; font: 800 12pt var(--display); margin-top: 1mm; }
.tl em { font-style: normal; font-size: 8pt; color: var(--green); font-weight: 600; }
.tl--now em { color: #A86400; }

.note { margin-top: 4mm; display: flex; gap: 8px; padding: 3.5mm 4.5mm; border-radius: 10px; background: var(--brand-50); font-size: 9pt; color: var(--ink-2); }
.note .i { color: var(--brand); margin-top: 2px; }
.note b { color: var(--ink); }
.note--warn { background: var(--amber-50); }
.note--warn .i { color: var(--amber); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 9pt; }
.tbl th { text-align: left; font-weight: 600; font-size: 7.5pt; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 2.5mm 3mm; border-bottom: 1px solid var(--line); }
.tbl td { padding: 3mm; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tr.best td { background: var(--green-50); }
.tbl tr.best td:first-child { border-radius: 8px 0 0 8px; } .tbl tr.best td:last-child { border-radius: 0 8px 8px 0; }
.tbl .sub { display: block; font-size: 7.5pt; color: var(--muted); }

/* Reviews & nearby */
.rv { display: grid; gap: 2.5mm; }
.rv li { display: flex; gap: 8px; padding: 3mm 4mm; border-radius: 10px; background: var(--soft); font-size: 9pt; }
.rv li small { display: block; font-size: 7.5pt; color: var(--muted); }
.rv .plus { color: var(--green); } .rv .minus { color: var(--red); }
.rv-head { display: flex; align-items: center; gap: 6px; font-size: 9pt; font-weight: 700; margin-bottom: 2.5mm; }

.map { position: relative; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; }
.map svg { display: block; width: 100%; height: auto; }
.near { display: grid; gap: 2mm; }
.near li { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 8px; padding: 2.5mm 3.5mm; border-radius: 9px; border: 1px solid var(--line); font-size: 9pt; }
.near li b { font-variant-numeric: tabular-nums; }
.near li small { display: block; font-size: 7.5pt; color: var(--muted); }
.near .i { color: var(--brand); }
.near .n { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 7.5pt; font-weight: 700; }

/* Questions */
.qs { display: grid; gap: 2mm; counter-reset: q; }
.q { display: grid; grid-template-columns: 8mm 1fr auto; gap: 4mm; padding: 3mm 4.5mm; border: 1px solid var(--line); border-radius: 12px; align-items: start; }
.q::before { counter-increment: q; content: counter(q); width: 8mm; height: 8mm; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); font: 800 11pt var(--display); }
.q b { display: block; font-size: 10.5pt; }
.q p { margin-top: .8mm; font-size: 8.5pt; color: var(--muted); }
.checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm; }
.checks > div { padding: 3.5mm 4mm; border-radius: 12px; background: var(--soft); }
.checks b { display: flex; align-items: center; gap: 6px; font-size: 9.5pt; margin-bottom: 2mm; }
.checks b .i { color: var(--brand); }
.checks li { position: relative; padding-left: 10px; font-size: 8.5pt; color: var(--ink-2); }
.checks li + li { margin-top: 1mm; }
.checks li::before { content: ""; position: absolute; left: 0; top: .6em; width: 4px; height: 4px; border-radius: 50%; background: var(--brand-300); }
.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; font-size: 8pt; color: var(--ink-2); }
.method b { display: block; font-size: 8.5pt; color: var(--ink); margin-bottom: 1mm; }

/* Page 1 action plan */
.next { margin-top: 7mm; padding: 5mm 6mm; border-radius: 14px; border: 1px solid #D6E6FD; background: linear-gradient(120deg, var(--brand-50), #fff 70%); }
.next__title { font: 800 11pt var(--display); margin-bottom: 3.5mm; }
.next ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5mm; counter-reset: n; }
.next li { position: relative; padding-left: 10mm; }
.next li::before { counter-increment: n; content: counter(n); position: absolute; left: 0; top: 0; width: 7mm; height: 7mm; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font: 800 9pt var(--display); }
.next b { display: block; font-size: 9.5pt; line-height: 1.3; }
.next span { display: block; margin-top: 1mm; font-size: 8pt; color: var(--muted); }
.page--dense .sec { margin-bottom: 5.5mm; }
