:root {
  --bg: #f7f7f5; --surface: #ffffff; --text: #1d1d1b; --muted: #5f5f5a;
  --border: #e3e2dd; --accent: #1f6f5c; --accent-text: #ffffff; --warn: #8a5a00;
  --radius: 10px; --maxw: 760px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #151514; --surface: #1f1f1d; --text: #ecebe6; --muted: #a7a69f; --border: #34332f; --accent: #5cc3a6; --accent-text: #0d1f1a; --warn: #e0b45c; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
header.site { border-bottom: 1px solid var(--border); background: var(--surface); }
header.site .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 52px; gap: 12px; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
.langs a { color: var(--muted); text-decoration: none; margin-left: 10px; font-size: .9rem; }
.langs a[aria-current="true"] { color: var(--text); font-weight: 600; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 28px 0 8px; }
.lead { color: var(--muted); margin-top: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input, select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font-size: 1rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.btn, button { cursor: pointer; border: 0; border-radius: 8px; padding: 11px 16px; font-size: 1rem; font-weight: 600; background: var(--accent); color: var(--accent-text); }
.btn-secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); text-decoration: none; display: inline-block; white-space: nowrap; }
.result { font-size: 1.1rem; }
.result .big { font-size: 2rem; font-weight: 700; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.muted, .small { color: var(--muted); font-size: .9rem; }
details { margin: 8px 0; } summary { cursor: pointer; font-weight: 600; }
footer.site { border-top: 1px solid var(--border); margin-top: 40px; padding: 20px 0 40px; color: var(--muted); font-size: .85rem; }
/* fake door */
.fd-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.fd-modal { background: var(--surface); color: var(--text); border-radius: 14px; padding: 24px; max-width: 440px; width: 100%; }
.fd-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fd-actions button:not(:first-child) { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.fd-small { color: var(--muted); font-size: .8rem; margin-bottom: 0; }
/* referrals */
[data-referrals] h3 { margin-top: 0; }
.ref-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ref-card p { margin: 2px 0; color: var(--muted); font-size: .9rem; }
.ref-risk { color: var(--warn) !important; font-weight: 600; }
.ref-disclosure { font-size: .8rem; color: var(--muted); }
/* fake checkout */
.co-table { margin: 8px 0 4px; }
.co-table td { padding: 8px 0; }
.co-amt { text-align: right; white-space: nowrap; }
.co-total td { font-weight: 700; border-bottom: 0; }
.fd-modal .fd-chips button { padding: 6px 12px; font-size: .9rem; background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.fd-modal .fd-chips button.chosen { background: var(--accent); color: var(--accent-text); }
.fd-chips button:disabled:not(.chosen) { opacity: .5; }
.fd-modal { max-height: 90vh; overflow-y: auto; }
.fd-modal .ref-box { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 4px; }
.fd-modal .ref-box h3 { font-size: 1rem; }
/* consent */
.consent-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-width: 640px; margin: 0 auto; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: .92rem; }
.consent-bar p { margin: 0 0 10px; }
.consent-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font-weight: 400; font-size: inherit; }
