:root {
  --bg: #f6f7fb; --bg-2: #eef0f8; --fg: #0f172a; --muted: #5b6478; --card: #ffffff; --line: #e3e6ef;
  --accent: #4f46e5; --accent-2: #7c3aed; --accent-ink: #ffffff; --accent-soft: #eef0ff;
  --yes: #15803d; --yes-bg: #e7f7ed; --tight: #b45309; --tight-bg: #fdf3e2; --no: #b91c1c; --no-bg: #fdecec;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .04), 0 20px 48px rgba(79, 70, 229, .12);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b12; --bg-2: #11131d; --fg: #eef0f6; --muted: #9aa3b8; --card: #141724; --line: #252a3b;
    --accent: #818cf8; --accent-2: #a78bfa; --accent-ink: #0a0b12; --accent-soft: #1d2140;
    --yes: #4ade80; --yes-bg: #0f2a1b; --tight: #fbbf24; --tight-bg: #2d220c; --no: #f87171; --no-bg: #2e1214;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 56px rgba(0, 0, 0, .45);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-image: radial-gradient(1200px 480px at 50% -120px, var(--accent-soft), transparent 70%);
  background-repeat: no-repeat;
}
a { color: var(--accent); text-underline-offset: 2px; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg-2); padding: 1px 6px; border-radius: 6px; }
.wrap, main, footer .wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; text-decoration: none; color: var(--fg); }
.logo-mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: #fff; font-size: .8rem; }
.site-header nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 6px 10px; border-radius: 8px; }
.site-header nav a:hover { color: var(--fg); background: var(--bg-2); }
.site-header nav a.nav-cta { color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); font-weight: 600; margin-left: 6px; }
.site-header nav a.nav-cta:hover { filter: brightness(1.08); }
@media (max-width: 560px) {
  .site-header .wrap { gap: 10px; }
  .site-header nav a { padding: 6px 7px; font-size: .9rem; }
  .site-header nav a.hide-sm { display: none; }
}

/* type */
h1 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); line-height: 1.15; letter-spacing: -.025em; margin: 36px 0 10px; }
h2 { font-size: 1.3rem; letter-spacing: -.01em; margin: 40px 0 12px; }
h3 { margin: 0; }
.lead { color: var(--muted); margin-top: 0; font-size: 1.08rem; max-width: 62ch; }
.note { color: var(--muted); font-size: .9rem; }
.eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.hero { text-align: center; padding-top: 8px; }
.hero .lead { margin: 0 auto; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 24px 0; box-shadow: var(--shadow); }
.calc { box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); padding: 28px; position: relative; }
.calc::before { content: ""; position: absolute; inset: -1px -1px auto -1px; height: 4px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
@media (max-width: 560px) { .card, .calc { padding: 18px; } }

/* form */
label { display: block; font-weight: 600; font-size: .85rem; color: var(--muted); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .04em; }
select, input { width: 100%; padding: 12px 40px 12px 14px; font: inherit; font-weight: 500; border-radius: 10px; border: 1px solid var(--line); background-color: var(--bg); color: var(--fg);
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
select:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

/* verdict + result */
#result { margin-top: 24px; padding-top: 24px; border-top: 1px dashed var(--line); }
.verdict { display: inline-flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 800; padding: 6px 14px 6px 10px; border-radius: 999px; }
.verdict::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent); }
.verdict.yes { background: var(--yes-bg); } .verdict.tight { background: var(--tight-bg); } .verdict.no { background: var(--no-bg); }
.yes { color: var(--yes); } .tight { color: var(--tight); } .no { color: var(--no); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 14px; }
.stat { background: var(--bg-2); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.stat span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.stat strong { display: block; font-size: 1.3rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat small { color: var(--muted); font-size: .8rem; }
@media (max-width: 480px) { .stats { gap: 8px; } .stat { padding: 10px; } .stat strong { font-size: 1.05rem; } }
.meter { margin: 6px 0 14px; }
.meter-track { height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: var(--yes); }
.meter-fill.tight { background: var(--tight); } .meter-fill.no { background: var(--no); }
.meter-label { display: flex; justify-content: space-between; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.more { font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* buttons */
.cta { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); padding: 11px 18px; border-radius: 10px; text-decoration: none; font-weight: 700; margin: 6px 8px 6px 0; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 28%, transparent); transition: transform .12s, filter .12s; }
.cta:hover { transform: translateY(-1px); filter: brightness(1.06); }
.cta.ghost { background: var(--card); color: var(--fg); border: 1px solid var(--line); box-shadow: none; }

/* referral panel */
.rent { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; align-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--card)), color-mix(in srgb, var(--accent-2) 10%, var(--card)));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: var(--radius); padding: 24px; margin: 24px 0; box-shadow: var(--shadow); }
.rent h3 { font-size: 1.25rem; letter-spacing: -.01em; margin: 4px 0 6px; line-height: 1.3; }
.rent p { margin: 0; color: var(--muted); font-size: .95rem; }
.providers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.provider { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-decoration: none; color: var(--fg); transition: transform .12s, border-color .12s, box-shadow .12s; }
.provider:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.provider strong { font-size: 1.1rem; }
.provider small { color: var(--muted); font-size: .85rem; line-height: 1.4; }
.provider .go { margin-top: 8px; color: var(--accent); font-weight: 700; font-size: .92rem; }
@media (max-width: 720px) { .rent { grid-template-columns: 1fr; padding: 20px; } }
@media (max-width: 420px) { .providers { grid-template-columns: 1fr; } }
.rent-inline { margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--no-bg); }
.rent-inline p { margin: 0 0 6px; font-weight: 600; }

/* tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg-2); font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 50%, transparent); }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
td.yes, td.tight, td.no { font-weight: 700; }
td.yes::before, td.tight::before, td.no::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 8px; vertical-align: middle; }

/* link grids */
.links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.links a { display: block; height: 100%; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--fg); font-weight: 500; transition: border-color .12s, transform .12s; }
.links a:hover { border-color: var(--accent); transform: translateY(-1px); }
.links a::after { content: " →"; color: var(--accent); }
.spec { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.spec li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .9rem; color: var(--muted); }
.spec li strong { color: var(--fg); }

/* footer */
footer { color: var(--muted); font-size: .85rem; padding: 32px 0 40px; border-top: 1px solid var(--line); margin-top: 56px; }
footer p { margin: 0 0 6px; }

/* breadcrumbs, FAQ, code blocks (SEO additions) */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 20px 0 -20px; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; }
pre code { background: none; padding: 0; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0 0 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
