/* Rappen landing pages (/rappen/, /rappen/fr|it|en/). Builds on styles.css + modern.css. */
.rp { --rp: #ff4a6b; --rp-2: #ff8a45; --rp-wash: rgba(255, 74, 107, 0.1); }

.rp-lang { display: flex; justify-content: flex-end; gap: 6px; margin: 24px 0 -40px; position: relative; z-index: 3; }
.rp-lang a { margin: 0; padding: 6px 10px; border-radius: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted); text-decoration: none; border: 1px solid transparent; }
.rp-lang a:hover { color: var(--ink); border-color: var(--line); }
.rp-lang a[aria-current="page"] { color: var(--ink); border-color: var(--line); background: rgba(255, 255, 255, 0.04); }

.rp-hero { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr); gap: 56px; align-items: center; padding: 88px 0 40px; position: relative; z-index: 2; }
.rp-brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 22px; margin-bottom: 26px; }
.rp-brand img { border-radius: 12px; }
.rp-hero h1 { font-size: clamp(40px, 5.2vw, 64px); line-height: 1.02; letter-spacing: -0.035em; margin: 14px 0 18px; }
.rp-hero .lede { max-width: 30em; }
.rp-hero .btn.primary, .rp .band .btn.primary, .rp-upsell .btn.primary, #rp-print { background: linear-gradient(135deg, var(--rp), var(--rp-2)); color: #fff; box-shadow: 0 12px 34px -14px var(--rp); }
.rp-hero .btn.primary:hover, .rp .band .btn.primary:hover, .rp-upsell .btn.primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--rp), var(--rp-2)); }
.rp-hero-shot img { width: 100%; height: auto; display: block; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8); }

.rp h2 { font-family: var(--display); letter-spacing: -0.025em; }
.rp-feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.rp-feat { border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 18px; background: rgba(255, 255, 255, 0.025); }
.rp-feat h3 { margin: 0 0 8px; font-size: 18px; }
.rp-feat h3::before { content: ''; display: block; width: 28px; height: 3px; border-radius: 3px; margin-bottom: 14px; background: linear-gradient(90deg, var(--rp), var(--rp-2)); }
.rp-feat p { margin: 0; color: var(--muted); line-height: 1.55; }

.rp-gen-intro { color: var(--muted); max-width: 46em; }
.rp-gen-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 24px; margin-top: 24px; align-items: start; }
.rp-form, .rp-out { border: 1px solid var(--line); border-radius: 20px; padding: 20px; background: rgba(255, 255, 255, 0.03); }
.rp-form fieldset { border: 0; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.rp-form legend { font-weight: 700; margin-bottom: 8px; font-size: 15px; }
.rp-row { display: grid; gap: 10px; }
.rp-row-street { grid-template-columns: minmax(0, 1fr) 90px; }
.rp-row-city { grid-template-columns: 96px minmax(0, 1fr) 80px; }
.rp-row-amount { grid-template-columns: minmax(0, 1fr) 96px; }
.rp-field { display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.rp-field input, .rp-field select { width: 100%; min-width: 0; height: 40px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.18); color: var(--ink); padding: 0 12px; font: inherit; font-size: 14.5px; }
.rp-field input:focus, .rp-field select:focus { outline: none; border-color: var(--rp); box-shadow: 0 0 0 3px var(--rp-wash); }
.rp-field select option { background: #0a2e52; }
.rp-debtor { border-top: 1px solid var(--line); padding-top: 12px; }
.rp-debtor summary { cursor: pointer; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.rp-debtor[open] { display: grid; gap: 10px; }
.rp-privacy { margin: 12px 0 0; font-size: 12.5px; color: var(--muted-dim); }

.rp-out-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-weight: 700; }
.rp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-actions .btn { padding: 9px 14px; font-size: 13.5px; }
.rp-actions .btn:disabled { opacity: 0.45; pointer-events: none; }
.rp-bill { background: #fff; border-radius: 10px; aspect-ratio: 2 / 1; display: grid; place-items: center; overflow: hidden; }
.rp-bill svg { width: 100%; height: 100%; display: block; }
.rp-empty { color: #57606a; padding: 24px; text-align: center; font-size: 14px; max-width: 26em; }
.rp-error { color: #ffb4c1; background: rgba(255, 74, 107, 0.12); border: 1px solid rgba(255, 74, 107, 0.35); border-radius: 12px; padding: 10px 14px; margin: 12px 0 0; font-size: 14px; }
.rp-upsell { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.rp-upsell p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.rp-upsell .btn { flex-shrink: 0; }

.rp-shot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rp-shot-grid img { width: 100%; height: auto; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.12); }

.rp .tier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 20px 0 10px; max-width: 900px; }
.rp .tier { background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 30px; display: flex; flex-direction: column; }
.rp .tier.featured { border-color: rgba(255, 74, 107, 0.55); box-shadow: 0 30px 70px -40px var(--rp); }
.rp .tier h2 { font-size: 1.3rem; font-weight: 600; margin: 0 0 6px; }
.rp .tier .price { font-family: var(--display); font-size: 2.2rem; font-weight: 700; margin: 0 0 4px; }
.rp .tier .price-note { color: var(--muted-dim); font-size: 0.85rem; margin: 0 0 20px; line-height: 1.5; }
.rp-faqs { max-width: 820px; }
.rp-faq { border-bottom: 1px solid var(--line); padding: 16px 0; }
.rp-faq summary { cursor: pointer; font-weight: 700; font-size: 17px; }
.rp-faq p { color: var(--muted); line-height: 1.6; margin: 10px 0 0; }
.rp-legal { font-size: 12.5px; color: var(--muted-dim); text-align: center; margin: 18px 0 0; }
.rp-legal a { color: var(--muted); }

#rp-sheet { display: none; }

/* Guides and tools (/rappen/<guide>/) */
.rp-guide-hero { padding-bottom: 8px; }
.rp-guide-hero .back-link { display: table; margin-bottom: 18px; }
.rp-guide-hero h1 { max-width: 22ch; }
.rp-guide-tool { padding-top: 8px; }
.rp-tool { margin-top: 0; }
.rp-tool .rp-form { display: grid; gap: 14px; }
.rp-tool .rp-form fieldset { margin: 0; gap: 8px; }
.rp-choice { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink); cursor: pointer; }
.rp-choice input { accent-color: var(--rp); width: 17px; height: 17px; margin: 0; }
.rp-row-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.rp-field input[type="date"] { color-scheme: dark; }
.rp-result { margin: 0; display: grid; gap: 4px; }
.rp-result > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.rp-result dt { color: var(--muted); }
.rp-result dd { margin: 0; font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 600; }
.rp-result .rp-result-total { border-bottom: 0; }
.rp-result .rp-result-total dt { color: var(--ink); font-weight: 700; }
.rp-result .rp-result-total dd { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--ink); }
.rp-result > div[hidden] { display: none; }
.rp-letter { margin: 0; white-space: pre-wrap; word-wrap: break-word; background: #fff; color: #1d1d1f; border-radius: 12px; padding: 26px 28px; font: 14.5px/1.6 var(--body, system-ui), system-ui, sans-serif; min-height: 320px; }
.rp-checklist h2 { margin: 0 0 18px; font-size: 1.3rem; }
.rp-checklist { max-width: 820px; }
.rp-guide-body { max-width: 760px; padding: 24px 0 8px; }
.rp-guide-body .doc-section { margin-bottom: 40px; }
.rp-updated { font-size: 12.5px; color: var(--muted-dim); margin: 0 0 40px; }
.rp-more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.rp-more-card { display: block; border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; color: var(--ink); text-decoration: none; background: rgba(255, 255, 255, 0.025); transition: border-color 0.2s; }
.rp-more-card:hover { border-color: rgba(255, 74, 107, 0.55); }
.rp-more-card strong::after { content: ' →'; color: var(--rp); }
.rp-guides { margin-top: 8px; }

@media (max-width: 960px) {
  .rp-hero, .rp-gen-grid { grid-template-columns: 1fr; gap: 32px; }
  .rp-feat-grid { grid-template-columns: 1fr 1fr; }
  .rp-lang { margin-bottom: -20px; }
}
@media (max-width: 620px) {
  .rp-feat-grid, .rp-shot-grid, .rp .tier-grid, .rp-more-grid, .rp-row-2 { grid-template-columns: 1fr; }
  .rp-upsell { flex-direction: column; align-items: flex-start; }
  .rp-hero { padding-top: 56px; }
}

/* Printing the QR-bill: only the payment part, at the bottom of an A4 page. */
@media print {
  @page { size: A4; margin: 0; }
  body.rp > *:not(#rp-sheet) { display: none !important; }
  body.rp { background: #fff !important; }
  #rp-sheet { display: block; position: fixed; left: 0; bottom: 0; width: 210mm; height: 105mm; }
  #rp-sheet svg { width: 210mm; height: 105mm; display: block; }
  #rp-sheet.rp-letter-sheet { position: static; width: auto; height: auto; padding: 30mm 22mm; white-space: pre-wrap; color: #000; font: 11pt/1.55 system-ui, sans-serif; }
}

/* Template downloads */
.rp-dl h2 { margin: 0 0 16px; font-size: 1.3rem; }
.rp-dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rp-dl-btn { display: grid; gap: 4px; padding: 18px 20px; border-radius: 14px; text-decoration: none; color: #fff; background: linear-gradient(135deg, var(--rp), var(--rp-2)); box-shadow: 0 12px 34px -16px var(--rp); }
.rp-dl-btn:hover { filter: brightness(1.08); }
.rp-dl-btn strong { font-size: 16px; }
.rp-dl-btn strong::before { content: '↓  '; }
.rp-dl-btn span { font-size: 13px; opacity: 0.9; }
@media (max-width: 620px) { .rp-dl-grid { grid-template-columns: 1fr; } }
