/*
  report.css - "Prověření bytu": /proverit-byt (landing, preview, checkout)
  and /report/{token} (the paid report). Tailwind-free: every class is rp-*
  and defined here, because static/css/tailwind.css is a frozen build.
  Tokens (--housi-*) come from theme.css.

  1. Base + layout      2. Landing hero / lookup     3. Feature grid, FAQ
  4. Preview + checkout 5. Report header + verdict   6. Sections, tables
  7. Risks, questions   8. Refund box                9. Print
*/

.rp {
  --rp-blue: #2563eb; --rp-blue-d: #1d4ed8; --rp-blue-bg: #eff6ff;
  --rp-green: #047857; --rp-green-bg: #ecfdf5;
  --rp-amber: #b45309; --rp-amber-bg: #fffbeb;
  --rp-red: #b91c1c; --rp-red-bg: #fef2f2;
  --rp-line: var(--housi-line, #e5e7eb);
  --rp-soft: var(--housi-line-soft, #f0efea);
  --rp-ink: var(--housi-ink, #0b0d10);
  --rp-ink-2: var(--housi-ink-soft, #4b5563);
  --rp-ink-3: var(--housi-ink-mute, #9ca3af);
  max-width: 980px; margin: 0 auto; padding: 0 16px 64px;
  color: var(--rp-ink);
}
.rp-narrow { max-width: 760px; margin: 0 auto; }
.rp h1, .rp h2, .rp h3 { color: var(--rp-ink); letter-spacing: -.01em; }
.rp-num { font-variant-numeric: tabular-nums; }
.rp-muted { color: var(--rp-ink-2); }
.rp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.rp-card { background: #fff; border: 1px solid var(--rp-line); border-radius: 18px; padding: 22px; }
@media (min-width: 640px) { .rp-card { padding: 28px; } }
.rp-card + .rp-card { margin-top: 18px; }

.rp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid var(--rp-blue);
  background: var(--rp-blue); color: #fff; font: inherit; font-size: 15px; font-weight: 700;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.rp-btn:hover { background: var(--rp-blue-d); border-color: var(--rp-blue-d); }
.rp-btn:focus-visible, .rp-link:focus-visible, .rp-input:focus-visible { outline: 2px solid var(--rp-blue); outline-offset: 2px; }
.rp-btn[disabled] { opacity: .6; cursor: progress; }
.rp-btn--ghost { background: #fff; color: var(--rp-ink); border-color: var(--rp-line); }
.rp-btn--ghost:hover { background: #f9fafb; border-color: var(--rp-ink-3); }
.rp-btn--sm { min-height: 38px; padding: 0 14px; font-size: 13px; }
.rp-link { color: var(--rp-blue); text-decoration: none; font-weight: 600; }
.rp-link:hover { text-decoration: underline; }

.rp-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; background: #f3f4f6; color: var(--rp-ink-2); }
.rp-pill--green { background: var(--rp-green-bg); color: var(--rp-green); }
.rp-pill--blue { background: var(--rp-blue-bg); color: var(--rp-blue-d); }

/* ── 2. Landing hero / lookup ─────────────────────────────────────── */

.rp-hero { text-align: center; padding: 40px 0 28px; }
.rp-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rp-blue); margin: 0 0 12px; }
.rp-hero h1 { font-size: 30px; line-height: 1.15; font-weight: 800; margin: 0 auto 14px; max-width: 720px; }
@media (min-width: 640px) { .rp-hero h1 { font-size: 42px; } }
.rp-hero p { font-size: 17px; line-height: 1.6; color: var(--rp-ink-2); margin: 0 auto; max-width: 620px; }
.rp-hero p.rp-eyebrow { font-size: 12px; line-height: 1.4; color: var(--rp-blue); margin: 0 0 12px; max-width: none; }
.rp-hero p.rp-hint { font-size: 13px; color: var(--rp-ink-3); }

.rp-lookup { display: flex; flex-direction: column; gap: 10px; max-width: 680px; margin: 26px auto 10px; }
@media (min-width: 640px) { .rp-lookup { flex-direction: row; } }
.rp-input {
  flex: 1 1 auto; min-height: 52px; padding: 0 16px; font: inherit; font-size: 15px;
  border: 1px solid var(--rp-line); border-radius: 12px; background: #fff; color: var(--rp-ink); min-width: 0;
}
.rp-input:hover { border-color: var(--rp-ink-3); }
.rp-hint { font-size: 13px; color: var(--rp-ink-3); margin: 0; }
.rp-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--rp-ink-2); }
.rp-trust li { display: inline-flex; align-items: center; gap: 6px; }
.rp-trust svg { width: 16px; height: 16px; color: var(--rp-green); flex-shrink: 0; }

.rp-alert { border-radius: 14px; padding: 14px 16px; font-size: 14px; line-height: 1.55; margin: 0 0 18px; }
.rp-alert--warn { background: var(--rp-amber-bg); color: #78350f; border: 1px solid #fde68a; }
.rp-alert--ok { background: var(--rp-green-bg); color: #065f46; border: 1px solid #a7f3d0; }
.rp-alert--info { background: var(--rp-blue-bg); color: #1e3a8a; border: 1px solid #bfdbfe; }

/* ── 3. Feature grid, sample, FAQ ─────────────────────────────────── */

.rp-section-title { font-size: 22px; font-weight: 800; margin: 48px 0 6px; text-align: center; }
.rp-section-sub { text-align: center; color: var(--rp-ink-2); margin: 0 0 22px; font-size: 15px; }
.rp-features { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .rp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .rp-features { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rp-feature { background: #fff; border: 1px solid var(--rp-line); border-radius: 16px; padding: 18px; }
.rp-feature__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--rp-blue-bg); color: var(--rp-blue);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.rp-feature__icon svg { width: 20px; height: 20px; }
.rp-feature h3 { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.rp-feature p { font-size: 13.5px; line-height: 1.5; color: var(--rp-ink-2); margin: 0; }

.rp-guarantee { display: flex; gap: 16px; align-items: center; background: var(--rp-green-bg); border: 1px solid #a7f3d0;
  border-radius: 18px; padding: 20px 22px; margin: 32px auto 0; }
.rp-guarantee svg { width: 40px; height: 40px; color: var(--rp-green); flex-shrink: 0; }
.rp-guarantee h2 { font-size: 18px; margin: 0 0 4px; }
.rp-guarantee p { margin: 0; font-size: 14px; line-height: 1.55; color: #065f46; }

.rp-faq { max-width: 760px; margin: 0 auto; }
.rp-faq details { border: 1px solid var(--rp-line); border-radius: 12px; background: #fff; margin-bottom: 10px; }
.rp-faq summary { cursor: pointer; list-style: none; padding: 14px 16px; font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; gap: 12px; }
.rp-faq summary::-webkit-details-marker { display: none; }
.rp-faq summary::after { content: "+"; color: var(--rp-ink-3); font-weight: 400; font-size: 20px; line-height: 1; }
.rp-faq details[open] summary::after { content: "-"; }
.rp-faq summary:focus-visible { outline: 2px solid var(--rp-blue); outline-offset: 2px; border-radius: 12px; }
.rp-faq details p { margin: 0; padding: 0 16px 16px; color: var(--rp-ink-2); line-height: 1.6; font-size: 14.5px; }

/* ── 4. Preview + checkout ────────────────────────────────────────── */

.rp-preview { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
@media (min-width: 900px) { .rp-preview { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; } }
.rp-preview > .rp-card + .rp-card { margin-top: 0; }
.rp-listing { display: flex; gap: 16px; align-items: flex-start; }
.rp-listing img { width: 112px; height: 84px; object-fit: cover; border-radius: 12px; background: var(--rp-soft); flex-shrink: 0; }
.rp-listing h2 { font-size: 17px; line-height: 1.35; margin: 0 0 4px; }
.rp-listing p { margin: 0; font-size: 13.5px; color: var(--rp-ink-2); line-height: 1.5; }
.rp-listing p.rp-listing__price { font-size: 20px; font-weight: 800; color: var(--rp-ink); margin-top: 6px; }
.rp-checklist { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.rp-checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.rp-checklist svg { width: 18px; height: 18px; color: var(--rp-green); flex-shrink: 0; margin-top: 1px; }
.rp-locked { margin-top: 18px; border-radius: 14px; border: 1px dashed var(--rp-line); padding: 16px; position: relative; overflow: hidden; }
.rp-locked__blur { filter: blur(5px); user-select: none; pointer-events: none; }
.rp-locked__badge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.rp-checkout h2 { font-size: 18px; margin: 0 0 4px; }
.rp-price { font-size: 34px; font-weight: 800; margin: 6px 0 2px; }
.rp-price small { font-size: 15px; font-weight: 600; color: var(--rp-ink-2); }
.rp-field { margin: 14px 0 0; }
.rp-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.rp-field .rp-input { width: 100%; min-height: 46px; box-sizing: border-box; }
.rp-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--rp-ink-2); margin-top: 12px; cursor: pointer; }
.rp-check input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; accent-color: var(--rp-blue); }
.rp-checkout .rp-btn { width: 100%; margin-top: 16px; }
.rp-small { font-size: 12px; color: var(--rp-ink-3); line-height: 1.5; margin: 10px 0 0; }

.rp-orders { list-style: none; margin: 0; padding: 0; }
.rp-orders li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rp-soft); font-size: 14px; }
.rp-orders li:last-child { border-bottom: 0; }

/* ── 5. Report header + verdict ───────────────────────────────────── */

.rp-rhead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: flex-end; padding: 28px 0 18px; }
.rp-rhead h1 { font-size: 24px; line-height: 1.25; margin: 4px 0 4px; }
@media (min-width: 640px) { .rp-rhead h1 { font-size: 28px; } }
.rp-rhead p { margin: 0; color: var(--rp-ink-2); font-size: 14px; }
.rp-rhead__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.rp-verdict { border-radius: 20px; padding: 24px; border: 1px solid; }
.rp-verdict--great, .rp-verdict--good { background: var(--rp-green-bg); border-color: #a7f3d0; }
.rp-verdict--fair, .rp-verdict--unknown { background: #f8fafc; border-color: var(--rp-line); }
.rp-verdict--high { background: var(--rp-amber-bg); border-color: #fde68a; }
.rp-verdict--very_high { background: var(--rp-red-bg); border-color: #fecaca; }
.rp-verdict__label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px; color: var(--rp-ink-2); }
.rp-verdict h2 { font-size: 26px; margin: 0 0 8px; line-height: 1.2; }
@media (min-width: 640px) { .rp-verdict h2 { font-size: 32px; } }
.rp-verdict--great h2, .rp-verdict--good h2 { color: var(--rp-green); }
.rp-verdict--high h2 { color: var(--rp-amber); }
.rp-verdict--very_high h2 { color: var(--rp-red); }
.rp-verdict p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--rp-ink); max-width: 680px; }

.rp-kpis { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 18px 0 0; }
@media (min-width: 760px) { .rp-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rp-kpi { background: rgba(255,255,255,.75); border: 1px solid rgba(0,0,0,.06); border-radius: 14px; padding: 12px 14px; }
.rp-kpi dt { font-size: 12px; color: var(--rp-ink-2); margin: 0 0 3px; }
.rp-kpi dd { margin: 0; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rp-kpi small { display: block; font-size: 11.5px; font-weight: 400; color: var(--rp-ink-3); margin-top: 2px; }

/* fair price range bar */
.rp-range { margin: 22px 0 6px; }
.rp-range__track { position: relative; height: 12px; border-radius: 999px; background: linear-gradient(90deg, #dcfce7, #dbeafe 50%, #fee2e2); }
.rp-range__fair { position: absolute; top: -4px; bottom: -4px; border-radius: 999px; border: 2px solid var(--rp-blue); background: rgba(37,99,235,.08); }
.rp-range__mark { position: absolute; top: -9px; width: 3px; height: 30px; margin-left: -1.5px; border-radius: 2px; background: var(--rp-ink); }
.rp-range__labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--rp-ink-2); margin-top: 14px; gap: 8px; }
.rp-range__legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--rp-ink-2); margin-top: 10px; }
.rp-range__legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }

/* ── 6. Sections, tables ──────────────────────────────────────────── */

.rp-sec h2 { font-size: 19px; margin: 0 0 4px; }
.rp-sec__sub { margin: 0 0 16px; color: var(--rp-ink-2); font-size: 14px; line-height: 1.5; }
.rp-grid2 { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .rp-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rp-grid2 > .rp-card + .rp-card { margin-top: 0; } }
.rp-offer { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 14px; }
.rp-offer div { border-radius: 14px; padding: 14px; background: #f8fafc; border: 1px solid var(--rp-soft); }
.rp-offer dt { font-size: 12.5px; color: var(--rp-ink-2); margin: 0 0 3px; }
.rp-offer dd { margin: 0; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rp-ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.55; color: var(--rp-ink); }
.rp-ul li + li { margin-top: 5px; }
.rp-dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; margin: 0; font-size: 14px; }
.rp-dl dt { color: var(--rp-ink-2); }
.rp-dl dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.rp-dl .rp-dl__total { border-top: 1px solid var(--rp-line); padding-top: 8px; }

.rp-table-wrap { overflow-x: auto; margin: 0 -4px; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.rp-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--rp-ink-3); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--rp-line); }
.rp-table td { padding: 10px 6px; border-bottom: 1px solid var(--rp-soft); vertical-align: top; }
.rp-table td.r, .rp-table th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-table tr.rp-row--me td { background: var(--rp-blue-bg); font-weight: 600; }
.rp-table a { color: var(--rp-ink); text-decoration: none; }
.rp-table a:hover { color: var(--rp-blue); text-decoration: underline; }
.rp-gone { font-size: 11.5px; color: var(--rp-amber); font-weight: 600; white-space: nowrap; }

.rp-steps { list-style: none; margin: 0; padding: 0; }
.rp-steps li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rp-soft); font-size: 14px; }
.rp-steps li:last-child { border-bottom: 0; }
.rp-down { color: var(--rp-green); font-weight: 700; }
.rp-up { color: var(--rp-red); font-weight: 700; }
.rp-spark { display: block; width: 100%; height: 64px; margin: 6px 0 4px; }

/* ── 7. Risks, questions ──────────────────────────────────────────── */

.rp-risks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rp-risk { display: flex; gap: 12px; border-radius: 14px; padding: 12px 14px; border: 1px solid var(--rp-line); }
.rp-risk svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.rp-risk h3 { font-size: 14.5px; margin: 0 0 2px; }
.rp-risk p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--rp-ink-2); }
.rp-risk--red { background: var(--rp-red-bg); border-color: #fecaca; } .rp-risk--red svg { color: var(--rp-red); }
.rp-risk--amber { background: var(--rp-amber-bg); border-color: #fde68a; } .rp-risk--amber svg { color: var(--rp-amber); }
.rp-risk--green { background: var(--rp-green-bg); border-color: #a7f3d0; } .rp-risk--green svg { color: var(--rp-green); }
.rp-risk--info svg { color: var(--rp-blue); }
.rp-questions { margin: 0; padding: 0; list-style: none; counter-reset: q; }
.rp-questions li { counter-increment: q; display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rp-soft); font-size: 14px; line-height: 1.5; }
.rp-questions li::before { content: counter(q); flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--rp-blue-bg); color: var(--rp-blue-d); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ── 8. Refund box ────────────────────────────────────────────────── */

.rp-refund { border-radius: 18px; border: 1px solid var(--rp-line); background: #f8fafc; padding: 20px 22px; margin-top: 18px; }
.rp-refund h2 { font-size: 17px; margin: 0 0 4px; }
.rp-refund p { margin: 0; font-size: 14px; color: var(--rp-ink-2); line-height: 1.55; }
.rp-refund details { margin-top: 12px; }
.rp-refund summary { display: inline-flex; list-style: none; }
.rp-refund summary::-webkit-details-marker { display: none; }
.rp-refund textarea { width: 100%; box-sizing: border-box; min-height: 96px; margin-top: 12px; padding: 12px; font: inherit; font-size: 14px;
  border: 1px solid var(--rp-line); border-radius: 12px; resize: vertical; }
.rp-refund textarea:focus-visible { outline: 2px solid var(--rp-blue); outline-offset: 2px; }
.rp-footnote { font-size: 12px; color: var(--rp-ink-3); line-height: 1.6; margin: 22px 0 0; }

.rp-pending { text-align: center; padding: 70px 0; }
.rp-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #e5e7eb; border-top-color: var(--rp-blue);
  animation: rp-spin .8s linear infinite; margin: 0 auto 18px; }
@keyframes rp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rp-spinner { animation: none; } }

/* ── 9. Print ("Uložit jako PDF") ─────────────────────────────────── */

@media print {
  .housi-nav, header, footer, .rp-noprint, #cookie-consent { display: none !important; }
  body { background: #fff !important; }
  .rp { max-width: none; padding: 0; }
  .rp-card, .rp-verdict, .rp-refund { break-inside: avoid; box-shadow: none; }
  .rp-table { min-width: 0; }
  a { color: inherit !important; text-decoration: none !important; }
}
