/* dibz.ca/blog — article list and article pages (on top of site.css). */
.blog main { min-height: 60vh; }
/* The blog (index and articles) always reads black on white, whatever the
   visitor's theme: <html data-theme="light"> keeps site.css's light tokens. */
.blog-white { --bg: #ffffff; --card: #ffffff; }
.blog-white .post-card, .blog-white .prose .chart, .blog-white .prose .rates-box, .blog-white .prose .table { border-color: #dfe4ec; }
.blog .nav-links a[aria-current="page"] { color: #fff; }

/* Index hero */
.blog-hero { background: radial-gradient(1200px 400px at 80% -10%, rgba(16,185,129,.28), transparent 60%), linear-gradient(180deg, #0a192f, #0d2340); color: #fff; padding: 72px 0 64px; }
.blog-hero .eyebrow { color: var(--accent-bright); font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.blog-hero h1 { font-size: clamp(34px, 5.2vw, 56px); font-weight: 800; margin-top: 12px; max-width: 820px; }
.blog-hero .lede { color: rgba(255,255,255,.78); font-size: 19px; margin-top: 16px; max-width: 640px; }
.cats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.cats a { color: #fff; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 8px 15px; font-size: 14px; font-weight: 600; }
.cats a:hover { background: rgba(255,255,255,.1); text-decoration: none; }

/* Cards */
.blog-list { padding-top: 48px; padding-bottom: 72px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin-top: 22px; }
.post-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 1px 2px rgba(10,25,47,.06), 0 18px 40px rgba(10,25,47,.14); }
.post-card img, .post-card .ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: linear-gradient(135deg, #0a192f, #065f46); }
.post-card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .cat { color: var(--chip-text); background: var(--chip); align-self: flex-start; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.post-card h2, .post-card h3 { font-size: 21px; line-height: 1.22; letter-spacing: -.01em; }
.post-card p { color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.post-card .meta { color: var(--muted); font-size: 13.5px; margin-top: auto; padding-top: 6px; }
.post-card.big { flex-direction: row; }
.post-card.big img { width: 58%; aspect-ratio: 16 / 9; }
.post-card.big .body { justify-content: center; padding: 32px 36px; }
.post-card.big h2 { font-size: clamp(24px, 2.6vw, 32px); }
.post-card.big p { font-size: 17px; }
@media (max-width: 860px) { .post-card.big { flex-direction: column; } .post-card.big img { width: 100%; } .post-card.big .body { padding: 22px; } }
.cat-head { font-size: 26px; margin-top: 56px; scroll-margin-top: 90px; }

/* Call to action */
.blog-cta { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; margin: 56px 0 8px; padding: 32px 36px; border-radius: var(--radius); color: #fff;
  background: radial-gradient(600px 240px at 90% 0%, rgba(52,211,153,.25), transparent 60%), linear-gradient(135deg, #0a192f, #0f3d3a); }
.blog-cta h2 { font-size: 26px; }
.blog-cta p { color: rgba(255,255,255,.78); margin-top: 8px; max-width: 620px; font-size: 16px; }
.blog-cta .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-ghost-dark { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45); }
.btn-ghost-dark:hover { box-shadow: inset 0 0 0 1.5px #fff; text-decoration: none; }
/* Store badges (as on dibz.ca/app): Google Play, and the iPhone beta on TestFlight. */
.stores { display: inline-flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px 0 14px; border-radius: 12px; background: #000;
  border: 1px solid rgba(255,255,255,.32); color: #fff; line-height: 1.05; }
.store-ic { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 11px; font-weight: 500; letter-spacing: .01em; color: rgba(255,255,255,.85); }
.store b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
a.store { text-decoration: none; transition: transform .12s; }
a.store:hover { transform: translateY(-1px); text-decoration: none; }


/* City pages (/homes-for-sale/<city>/, /sold-homes/<city>/, /sitemap/) */
.city-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn-big { padding: 18px 28px; font-size: 18px; }
.btn-line { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); padding: 18px 24px; font-size: 16px; white-space: normal; text-align: center; }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.city-note { font-size: 15px; color: var(--muted); margin-top: 14px; }
.city .prose .stats-grid { margin-top: .8em; }
.post.city .post-layout { grid-template-columns: minmax(0, 860px); margin-top: 20px; }
.city .prose .table td { font-variant-numeric: tabular-nums; }
.city-links { list-style: none; padding: 0 !important; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.city-links li { margin: 0 !important; }
.city-links li::marker { content: none; }
.city-links a { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text); font-weight: 600; font-size: 15.5px; text-decoration: none !important; line-height: 1.35; }
.city-links a:hover { border-color: var(--accent); color: var(--accent); }
.city-index { padding-top: 24px; padding-bottom: 72px; }
.city-index h2 { font-size: 24px; margin-top: 40px; scroll-margin-top: 90px; }
.btn:focus-visible, .city-links a:focus-visible, .crumbs a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 600px) { .btn-big, .btn-line { width: 100%; } }

/* Article */
.post-head { max-width: 860px; padding-top: 48px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.crumbs a { font-weight: 600; }
.post-head h1 { font-size: clamp(32px, 4.6vw, 50px); font-weight: 800; margin-top: 14px; line-height: 1.08; }
.post-head .lede { font-size: 20px; color: var(--muted); margin-top: 16px; line-height: 1.5; }
.post-head .meta { font-size: 14.5px; color: var(--muted); margin-top: 16px; }
.post-hero { max-width: 1100px; margin-top: 32px; }
.post-hero img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; box-shadow: var(--shadow); }
.post-layout { display: grid; grid-template-columns: 240px minmax(0, 720px); gap: 56px; justify-content: center; margin-top: 44px; }
.post-layout:not(:has(.toc)) { grid-template-columns: minmax(0, 720px); }
.toc { position: sticky; top: 88px; align-self: start; font-size: 14.5px; border-left: 2px solid var(--line); padding-left: 16px; }
.toc strong { display: block; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.toc a { color: var(--text); opacity: .78; line-height: 1.35; display: block; }
.toc a:hover { opacity: 1; color: var(--accent); text-decoration: none; }
@media (max-width: 1000px) { .post-layout { grid-template-columns: minmax(0, 720px); } .toc { display: none; } }

.prose { font-size: 18px; line-height: 1.72; color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: 29px; line-height: 1.2; margin-top: 1.9em; color: var(--text); scroll-margin-top: 90px; }
.prose h3 { font-size: 21px; line-height: 1.3; margin-top: 1.6em; color: var(--text); scroll-margin-top: 90px; }
.prose h4 { font-size: 18px; margin-top: 1.4em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 18px 22px; border-left: 4px solid var(--accent); background: var(--chip); border-radius: 0 14px 14px 0; color: var(--text); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.prose code { font-size: .88em; background: var(--chip); padding: 2px 6px; border-radius: 6px; }
.prose .table { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.42; }
.prose th, .prose td { padding: 11px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose thead th { background: color-mix(in srgb, var(--chip) 70%, var(--card)); font-size: 12.5px; letter-spacing: .02em; color: var(--text); }
.prose tbody tr:last-child th, .prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody th { font-weight: 700; color: var(--text); }
.related { padding-bottom: 72px; }
.related h2 { font-size: 26px; margin-top: 56px; }
@media (max-width: 600px) { .prose { font-size: 17px; } .prose h2 { font-size: 25px; } .blog-cta { padding: 26px 22px; } }

/* Charts and infographics (blog-charts.mjs) */
.prose, .chart { --c1: #059669; --c2: #1e3a5f; --c3: #f59e0b; --c4: #6366f1; --c5: #e11d48; --c6: #0891b2; --chi: #0a192f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chart { --c1: #10b981; --c2: #93c5fd; --c3: #fbbf24; --c4: #a5b4fc; --c5: #fb7185; --c6: #22d3ee; --chi: #6ee7b7; } }
:root[data-theme="dark"] .chart { --c1: #10b981; --c2: #93c5fd; --c3: #fbbf24; --c4: #a5b4fc; --c5: #fb7185; --c6: #22d3ee; --chi: #6ee7b7; }
.prose .chart { margin: 2em 0; padding: 22px 22px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.chart figcaption { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.chart figcaption strong { font-family: var(--display); font-size: 19px; line-height: 1.3; color: var(--text); letter-spacing: -.01em; }
.chart figcaption span { font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart svg text { font: 13px/1 var(--font); fill: var(--muted); }
.chart svg .lbl { fill: var(--text); font-size: 13.5px; }
.chart svg .lbl.sm, .chart svg .val.sm { font-size: 12.5px; }
.chart svg .val { fill: var(--text); font-weight: 700; }
.chart svg .tick { font-size: 12px; }
.chart svg .seg { fill: #fff; font-weight: 700; font-size: 12.5px; }
.chart svg .big { fill: var(--text); font: 800 26px/1 var(--display); }
.chart svg .grid { stroke: var(--line); stroke-width: 1; }
.chart svg .line { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart svg .dot { stroke: var(--card); stroke-width: 2; }
.fill-c1 { fill: var(--c1); } .fill-c2 { fill: var(--c2); } .fill-c3 { fill: var(--c3); } .fill-c4 { fill: var(--c4); } .fill-c5 { fill: var(--c5); } .fill-c6 { fill: var(--c6); } .fill-hi { fill: var(--chi); }
.stroke-c1 { stroke: var(--c1); } .stroke-c2 { stroke: var(--c2); } .stroke-c3 { stroke: var(--c3); } .stroke-c4 { stroke: var(--c4); } .stroke-c5 { stroke: var(--c5); } .stroke-c6 { stroke: var(--c6); }
.fill-bg-c1 { background: var(--c1); } .fill-bg-c2 { background: var(--c2); } .fill-bg-c3 { background: var(--c3); } .fill-bg-c4 { background: var(--c4); } .fill-bg-c5 { background: var(--c5); } .fill-bg-c6 { background: var(--c6); }
.chart .legend, .chart .keys { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--text); }
.chart .sw { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 7px; vertical-align: -1px; }
.chart .donut { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.chart .donut svg { width: 200px; flex: none; }
.chart .donut .keys { flex-direction: column; gap: 10px; margin: 0; flex: 1; min-width: 220px; }
.chart .donut .keys li { display: flex; align-items: center; gap: 4px; }
.chart .donut .keys b { margin-left: auto; padding-left: 14px; font-weight: 700; }
.chart-note { font-size: 14px; color: var(--muted); margin-top: 12px !important; }
.chart-source { font-size: 12.5px; color: var(--muted); margin-top: 10px !important; }
.chart-data { margin-top: 10px; font-size: 14px; }
.chart-data summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13.5px; }
.chart-data table { margin-top: 10px; width: 100%; border-collapse: collapse; }
.chart-data th, .chart-data td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.chart-data td { text-align: right; font-variant-numeric: tabular-nums; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat { background: color-mix(in srgb, var(--chip) 60%, var(--card)); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.stat b { font: 800 28px/1.1 var(--display); color: var(--accent); letter-spacing: -.02em; }
.stat span { font-size: 15px; color: var(--text); line-height: 1.35; font-weight: 600; }
.stat small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.steps { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 0; counter-reset: s; }
.steps li { display: flex; gap: 16px; position: relative; padding-bottom: 20px; margin: 0 !important; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--line); }
.steps .n { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 15px; }
.steps b { display: block; font-size: 17px; color: var(--text); line-height: 1.35; margin-top: 6px; }
.steps em { display: inline-block; font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--chip-text); background: var(--chip); border-radius: 999px; padding: 2px 9px; margin-top: 4px; }
.steps p { font-size: 15.5px; line-height: 1.55; margin-top: 4px !important; color: var(--muted); }
.matrix { overflow-x: auto; }
.matrix table { width: 100%; border-collapse: collapse; font-size: 14px; }
.matrix th, .matrix td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.matrix tbody th { text-align: left; color: var(--text); font-weight: 700; }
.matrix thead th { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.matrix tr.hi { background: color-mix(in srgb, var(--chip) 70%, transparent); }
.matrix .yes { color: var(--accent); font-weight: 800; font-size: 17px; }
.matrix .no { color: var(--muted); }
.prose .pic { margin: 2em 0; }
.prose .pic img { width: 100%; border-radius: 18px; box-shadow: var(--shadow); }
.prose .pic figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; text-align: center; }
.post-hero video { width: 100%; height: auto; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; box-shadow: var(--shadow); background: #0a192f; display: block; }
@media (max-width: 600px) { .prose .chart { padding: 16px 12px 12px; margin-left: -4px; margin-right: -4px; } .chart svg text { font-size: 14px; } .stat b { font-size: 26px; } }
.about-team { max-width: 860px; margin-top: 48px; }
.about-team > div { border-top: 1px solid var(--line); padding-top: 22px; }
.about-team strong { font-size: 15px; color: var(--text); }
.about-team p { font-size: 15px; color: var(--muted); line-height: 1.6; margin-top: 6px; }

/* Mortgage rates: "Rates this week" box in articles (build-blog.mjs ratesBox) */
.prose .rates-box { margin: 1.6em 0 2em; padding: 20px 22px 18px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 18px; box-shadow: var(--shadow); }
.rates-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 8px; }
.rates-head strong { font: 800 19px/1.3 var(--display); color: var(--text); letter-spacing: -.01em; }
.rates-head span { font-size: 13px; font-weight: 700; color: var(--chip-text); background: var(--chip); border-radius: 999px; padding: 3px 10px; }
.rates-box dl { margin: 0; }
.rates-box .rate-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rates-box .rate-row:last-child { border-bottom: 0; }
.rates-box dt { font-size: 16px; line-height: 1.4; color: var(--text); font-weight: 600; }
.rates-box dd { margin: 0; display: flex; flex-direction: column; align-items: flex-end; flex: none; text-align: right; }
.rates-box dd b { font: 800 22px/1.15 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.rates-box dd small { font-size: 13px; line-height: 1.3; color: var(--muted); white-space: nowrap; }
.prose .rates-box p { font-size: 14px; line-height: 1.5; color: var(--muted); margin-top: 10px; }
.prose .rates-box .rates-note { margin-top: 6px; }
@media (max-width: 600px) { .prose .rates-box { padding: 16px 16px 14px; } .rates-box dt { font-size: 15px; } .rates-box dd b { font-size: 20px; } }

/* Mortgage rates on the blog index: Fixed / Variable / Banks lists */
.cat-lede { color: var(--muted); font-size: 17px; margin-top: 8px; max-width: 680px; }
.rate-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 22px; align-items: start; }
.rate-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.rate-group img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: linear-gradient(135deg, #0a192f, #065f46); }
.rate-group h3 { font-size: 21px; line-height: 1.25; padding: 18px 22px 6px; }
.rate-group ul { list-style: none; margin: 0; padding: 0 12px 14px; }
.rate-group li a { display: block; padding: 9px 10px; border-radius: 10px; color: var(--text); font-size: 16px; font-weight: 600; line-height: 1.35; }
.rate-group li a:hover { background: var(--chip); color: var(--chip-text); text-decoration: none; }
.rate-group li a:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; }
@media (max-width: 960px) { .rate-groups { grid-template-columns: 1fr; } .rate-group img { aspect-ratio: 3 / 1; } }
