/* ===== Rent vs. Buy — shared styles ===== */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e6eaf2;
  --line-strong: #d6dce8;
  --brand: #4f46e5;
  --brand-soft: #eef0ff;
  --buy: #6366f1;
  --rent: #0ea5e9;
  --good: #16a34a;
  --bad: #dc2626;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, #e9ecff 0%, transparent 55%),
    radial-gradient(900px 500px at -10% 0%, #e0f5ff 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { color: var(--brand); }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; font-weight: 700; font-size: 17px; color: var(--brand); text-decoration: none; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 6px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 9px; }
.nav-links a:hover, .nav-links a.active { color: var(--brand); background: var(--brand-soft); }
@media (max-width: 640px) { .nav-links a { padding: 8px 8px; font-size: 13px; } }

/* ---- Page shell ---- */
main { padding: 36px 0 60px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand);
  background: var(--brand-soft); padding: 5px 12px; border-radius: 999px;
}
h1 { font-size: 34px; line-height: 1.15; margin: 14px 0 10px; letter-spacing: -.02em; }
.lead { color: var(--muted); font-size: 16px; max-width: 640px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
}

/* ---- Calculator grid ---- */
.calc-grid { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; margin-top: 26px; }
@media (max-width: 900px) { .calc-grid { grid-template-columns: 1fr; } }

.section-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.section-title:not(:first-of-type) { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.control { display: flex; align-items: center; gap: 8px; background: #fbfcfe; border: 1px solid var(--line-strong); border-radius: 11px; padding: 0 12px; transition: border-color .15s, box-shadow .15s; }
.control:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.control .lead { color: var(--muted); font-size: 14px; }
.control input { flex: 1; border: none; background: transparent; outline: none; padding: 11px 0; font-size: 15px; color: var(--ink); width: 100%; font-variant-numeric: tabular-nums; }
.control .unit { color: var(--muted); font-size: 13px; white-space: nowrap; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.verdict { border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; color: #fff; background: linear-gradient(120deg,#4f46e5,#7c3aed); }
.verdict.rent { background: linear-gradient(120deg,#0284c7,#0ea5e9); }
.verdict .label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.verdict .headline { font-size: 26px; font-weight: 700; margin: 6px 0 4px; }
.verdict .detail { font-size: 14px; opacity: .92; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.stat { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fbfcfe; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stat .k .swatch { width: 9px; height: 9px; border-radius: 3px; }
.stat .v { font-size: 24px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.chart-head h3 { font-size: 15px; margin: 0; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
canvas { width: 100%; height: auto; display: block; }
details { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--brand); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "▸ "; }
details[open] summary::before { content: "▾ "; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
th, td { padding: 9px 8px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
tbody tr:hover { background: #fbfcfe; }

/* ---- Article / content ---- */
.article { max-width: 760px; margin: 40px auto 0; }
.article h2 { font-size: 24px; margin: 40px 0 12px; letter-spacing: -.01em; }
.article h3 { font-size: 18px; margin: 28px 0 8px; }
.article p { color: #1e293b; margin: 0 0 14px; }
.article ul { color: #1e293b; padding-left: 22px; }
.article li { margin-bottom: 8px; }
.callout { background: var(--brand-soft); border: 1px solid #dfe2ff; border-radius: 14px; padding: 16px 18px; margin: 18px 0; font-size: 14.5px; }
.faq dt { font-weight: 600; margin-top: 18px; }
.faq dd { margin: 6px 0 0; color: var(--muted); }

/* ---- Ad slots ---- */
.ad-slot { margin: 30px auto; text-align: center; }
.ad-slot .ad-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #aab2c5; margin-bottom: 6px; }
/* Placeholder look — replace .ad-ph with your real <ins> ad unit.
   margin:0 auto centers the box (fixes "stuck to one side").
   border-radius + overflow:hidden gives the rounded corners. */
.ad-ph {
  display: grid; place-items: center; margin: 0 auto;
  background: repeating-linear-gradient(45deg,#f1f4f9,#f1f4f9 10px,#eef1f7 10px,#eef1f7 20px);
  border: 1px dashed var(--line-strong); border-radius: 18px; overflow: hidden;
  color: #9aa3b5; font-size: 13px;
}
/* Real AdSense unit wrapper — round corners on the actual ad iframe */
.ad-unit { display: inline-block; width: 100%; border-radius: 18px; overflow: hidden; }
/* Sizes (responsive: width:100% with a max-width cap you control) */
.ad-banner      { width: 100%; max-width: 970px; height: 120px; }   /* wide, centered, balanced */
.ad-leaderboard { width: 100%; max-width: 728px; height: 90px; }
.ad-rectangle   { width: 100%; max-width: 336px; height: 280px; }
/* Ad docked at the bottom of the results card (fills empty space) */
.ad-incard { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; }
.ad-incard .ad-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #aab2c5; margin-bottom: 6px; }
.ad-incard .ad-ph { width: 100%; max-width: 468px; height: 160px; }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--line); background: rgba(255,255,255,.6); }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 20px 20px; }
footer .legal { color: var(--muted); font-size: 12px; margin: 0; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; }
.footer-links a:hover { color: var(--brand); }
