/* Solarqivo blog. Same colours and type as the main site; light by default, dark when the visitor
   picked dark (or their system is dark and they never chose). */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #f1f3f6;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --faint: #98a2b3;
  --primary: #1f6feb;
  --primary-hover: #1a5fd0;
  --primary-soft: #e8f0fe;
  --sun: #f59e0b;
  --sun-soft: #fff4dc;
  --tint-blue: #e3edff;
  --tint-amber: #fff2d6;
  --glass: rgba(255, 255, 255, 0.92);
  --code-bg: #f4f6fa;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12), 0 2px 6px rgba(16, 24, 40, 0.06);
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0b1220;
  --surface: #0b1220;
  --surface-2: #121a2b;
  --surface-3: #1d2840;
  --border: #26324a;
  --border-strong: #34425f;
  --text: #e8edf6;
  --text-2: #c4ccdc;
  --muted: #8d99b0;
  --faint: #66738c;
  --primary: #4f8cff;
  --primary-hover: #6d9fff;
  --primary-soft: rgba(79, 140, 255, 0.16);
  --sun-soft: rgba(245, 158, 11, 0.14);
  --tint-blue: rgba(79, 140, 255, 0.16);
  --tint-amber: rgba(245, 158, 11, 0.1);
  --glass: rgba(11, 18, 32, 0.88);
  --code-bg: #121a2b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
.b-wrap { width: min(1160px, 100% - 40px); margin: 0 auto; }
.b-muted { color: var(--muted); }

/* Buttons */
.b-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 12px;
  font-weight: 650; font-size: 15px; white-space: nowrap; transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.b-btn.small { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.b-btn.primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.b-btn.primary:hover { background: var(--primary-hover); }
.b-btn.light { background: #fff; color: #1e3a8a; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25); }
.b-btn.light:hover { transform: translateY(-2px); }

/* Header & footer */
.b-header { position: sticky; top: 0; z-index: 20; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.b-header-row { height: 66px; display: flex; align-items: center; gap: 28px; }
.b-header .b-btn { margin-left: auto; }
.b-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; letter-spacing: -0.02em; }
.b-brand svg { border-radius: 8px; flex-shrink: 0; }
.b-brand.small { font-size: 14px; }
.b-brand.small svg { width: 24px; height: 24px; }
.b-wordmark span { background: linear-gradient(120deg, #f59e0b, #ea580c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.b-nav { display: flex; gap: 24px; font-weight: 550; color: var(--text-2); font-size: 15px; }
.b-nav a:hover, .b-nav a.active { color: var(--primary); }
.b-footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: 13px; margin-top: 40px; }
.b-footer-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.b-footer nav { display: flex; gap: 18px; color: var(--text-2); }
.b-footer nav a:hover { color: var(--primary); }
.b-footer .b-muted { margin-left: auto; }

/* Shared bits */
.b-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); }
.b-grad { background: linear-gradient(100deg, #f59e0b 0%, #ea580c 55%, #db2777 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.b-lead { font-size: 18.5px; line-height: 1.6; color: var(--muted); margin: 0; max-width: 680px; }
.b-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--muted); }
.b-tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650;
  color: var(--primary); background: var(--primary-soft);
}
.b-empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* Blog index */
.b-hero { position: relative; overflow: hidden; padding: 64px 0 36px; }
.b-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 320px at 90% -10%, var(--tint-blue), transparent 70%), radial-gradient(520px 300px at 0% 20%, var(--tint-amber), transparent 70%);
}
.b-hero .b-wrap { position: relative; }
.b-hero h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.045em; margin: 12px 0 16px; font-weight: 800; }
.b-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.b-chip {
  height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.b-chip:hover { border-color: var(--border-strong); }
.b-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

.b-list { padding: 12px 0 24px; }
.b-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.b-card { border-radius: 20px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.b-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.b-card-link { display: flex; flex-direction: column; height: 100%; }
.b-card-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-3); }
.b-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; align-items: flex-start; }
.b-card h2, .b-card h3 { margin: 0; letter-spacing: -0.025em; line-height: 1.25; }
.b-card h3 { font-size: 19px; }
.b-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.b-card .b-meta { margin-top: auto; padding-top: 4px; }
.b-card.featured { margin-bottom: 22px; }
.b-card.featured .b-card-link { display: grid; grid-template-columns: 1.15fr 1fr; }
.b-card.featured .b-card-cover { aspect-ratio: auto; min-height: 320px; }
.b-card.featured .b-card-body { padding: 36px; justify-content: center; gap: 14px; }
.b-card.featured h2 { font-size: clamp(24px, 2.6vw, 34px); }
.b-card.featured p { font-size: 16.5px; -webkit-line-clamp: 4; }
.b-card.featured .b-meta { margin-top: 0; }
.b-read { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--primary); margin-top: 6px; }
.b-draft-tag { position: absolute; top: 12px; left: 12px; padding: 3px 10px; border-radius: 999px; background: #f59e0b; color: #1f1300; font-size: 12px; font-weight: 700; }

/* Generated cover art: a small panel array under a sun on a gradient */
.b-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.b-cover-art { position: absolute; inset: 0; background: radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.28), transparent 40%), linear-gradient(135deg, var(--a), var(--b)); }
.b-cover-sun { position: absolute; right: var(--sun, 16%); top: 16%; width: 13%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #fff7d6, #fde047 55%, #f59e0b); box-shadow: 0 0 40px rgba(253, 224, 71, 0.8); }
.b-cover-panels {
  position: absolute; left: 12%; right: 30%; bottom: 12%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px;
  transform: perspective(500px) rotateX(50deg) rotateZ(var(--turn, -10deg)); transform-origin: bottom;
}
.b-cover-panels i { aspect-ratio: 1 / 1.5; border-radius: 3px; background: linear-gradient(160deg, #1e40af, #0f1d3a); border: 1px solid rgba(191, 219, 254, 0.6); }

/* Post page */
.b-draft-bar { background: #f59e0b; color: #1f1300; text-align: center; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.b-post-head { padding: 48px 0 8px; }
.b-post-head > * { max-width: 820px; }
.b-post-head > .b-post-cover { max-width: none; }
.b-crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.b-crumbs a { color: var(--primary); font-weight: 600; }
.b-post-head h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.08; letter-spacing: -0.04em; margin: 0 0 16px; font-weight: 800; }
.b-byline { display: flex; align-items: center; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.b-byline b { font-size: 15px; }
.b-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; color: #fff; background: linear-gradient(135deg, #f59e0b, #ea580c); flex-shrink: 0; }
.b-post-cover { margin: 32px 0 0; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 8; position: relative; background: var(--surface-3); }

.b-post-grid { display: grid; grid-template-columns: minmax(0, 720px) 1fr; gap: 64px; padding-top: 32px; align-items: start; }
.b-toc { position: sticky; top: 96px; font-size: 14px; border-left: 1px solid var(--border); padding-left: 20px; }
.b-toc > span { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.b-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.b-toc a { color: var(--muted); line-height: 1.4; display: block; transition: color 0.15s; }
.b-toc a:hover, .b-toc a.on { color: var(--primary); }
.b-toc a.on { font-weight: 600; }

/* Article typography */
.b-prose { font-size: 18px; line-height: 1.75; color: var(--text-2); min-width: 0; }
.b-prose > :first-child { margin-top: 0; }
.b-prose p, .b-prose ul, .b-prose ol, .b-prose blockquote, .b-prose .table-wrap, .b-prose pre, .b-prose figure { margin: 0 0 1.3em; }
.b-prose h2, .b-prose h3 { color: var(--text); letter-spacing: -0.025em; line-height: 1.25; position: relative; }
.b-prose h2 { font-size: 28px; margin: 2em 0 0.7em; }
.b-prose h3 { font-size: 21px; margin: 1.7em 0 0.5em; }
.b-prose .anchor { position: absolute; left: -1em; width: 1em; color: var(--faint); opacity: 0; font-weight: 500; transition: opacity 0.15s; }
.b-prose h2:hover .anchor, .b-prose h3:hover .anchor { opacity: 1; }
.b-prose a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.b-prose a.anchor { text-decoration: none; color: var(--faint); }
.b-prose strong { color: var(--text); font-weight: 650; }
.b-prose ul, .b-prose ol { padding-left: 1.4em; }
.b-prose li { margin: 0.35em 0; }
.b-prose li::marker { color: var(--faint); }
.b-prose blockquote { margin-left: 0; padding: 16px 20px; border-left: 3px solid var(--sun); background: var(--sun-soft); border-radius: 0 12px 12px 0; color: var(--text); }
.b-prose blockquote p:last-child { margin-bottom: 0; }
.b-prose hr { border: none; border-top: 1px solid var(--border); margin: 2.4em 0; }
.b-prose img { border-radius: 14px; border: 1px solid var(--border); display: block; }
.b-prose code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.88em; background: var(--code-bg); padding: 2px 6px; border-radius: 6px; color: var(--text); }
.b-prose pre { background: var(--code-bg); padding: 16px 18px; border-radius: 12px; overflow-x: auto; border: 1px solid var(--border); line-height: 1.55; }
.b-prose pre code { background: none; padding: 0; font-size: 14px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.b-prose table { border-collapse: collapse; width: 100%; font-size: 15.5px; line-height: 1.5; }
.b-prose th, .b-prose td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.b-prose th { background: var(--surface-2); color: var(--text); font-weight: 650; white-space: nowrap; }
.b-prose tr:last-child td { border-bottom: none; }
.b-prose td { font-variant-numeric: tabular-nums; }

.b-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 2.4em 0 0; }
.b-share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--border); font-size: 14px; }
.b-share > span { color: var(--muted); font-weight: 600; margin-right: 4px; }
.b-share a, .b-share button {
  height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  display: inline-flex; align-items: center; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.b-share a:hover, .b-share button:hover { border-color: var(--border-strong); background: var(--surface-2); }

/* Call to action */
.b-cta {
  display: flex; align-items: center; gap: 28px; justify-content: space-between; margin: 48px 0 0; padding: 32px 36px; border-radius: 24px; color: #fff;
  background: radial-gradient(420px 220px at 95% 0%, rgba(251, 191, 36, 0.45), transparent 60%), linear-gradient(135deg, #2563eb, #4338ca);
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.25);
}
.b-cta h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.03em; color: #fff; line-height: 1.2; }
.b-cta p { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 15.5px; line-height: 1.55; max-width: 520px; }
.b-prose .b-cta a { text-decoration: none; color: #1e3a8a; }

.b-more { background: var(--surface-2); padding: 56px 0; margin-top: 64px; border-top: 1px solid var(--border); }
.b-more h2 { margin: 0 0 24px; font-size: 26px; letter-spacing: -0.03em; }

/* Responsive */
@media (max-width: 1020px) {
  .b-post-grid { grid-template-columns: 1fr; }
  .b-toc { display: none; }
  .b-grid { grid-template-columns: 1fr 1fr; }
  .b-card.featured .b-card-link { grid-template-columns: 1fr; }
  .b-card.featured .b-card-cover { min-height: 0; aspect-ratio: 16 / 9; }
  .b-card.featured .b-card-body { padding: 24px; }
}
@media (max-width: 720px) {
  .b-nav { display: none; }
  .b-grid { grid-template-columns: 1fr; }
  .b-prose { font-size: 17px; }
  .b-prose h2 { font-size: 24px; }
  .b-cta { flex-direction: column; align-items: flex-start; padding: 26px 22px; }
  .b-cta .b-btn { width: 100%; }
  .b-footer .b-muted { margin-left: 0; }
  .b-hero { padding-top: 40px; }
}
@media (max-width: 420px) {
  .b-header .b-btn { padding: 0 10px; font-size: 13px; }
  .b-brand .b-wordmark { display: none; }
}
