/* blog.css — the appbuilder.sh blog. Same tokens as the landing page (index.html), tuned for reading: one ~68ch
   column, wide figures, real tables. No JS, no framework — a post is one static HTML file. */
:root {
	--bg: #060607;
	--panel: #0e0e11;
	--line: rgba(255, 255, 255, 0.08);
	--line-strong: rgba(255, 255, 255, 0.14);
	--text: #f4f4f5;
	--text-2: #a1a1aa;
	--text-3: #76767f; /* 4.50:1 on --bg — the AA floor, measured for the landing page */
	--accent: #2dd4bf;
	--accent-2: #38bdf8;
	--accent-soft: rgba(45, 212, 191, 0.12);
	--grad: linear-gradient(100deg, #7dd3fc 0%, #38bdf8 30%, #2dd4bf 65%, #5eead4 100%);
	--font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--mono: 'Geist Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); overflow-x: clip; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 18px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #5eead4; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* header + footer */
.top { position: sticky; top: 0; z-index: 10; background: rgba(6, 6, 7, 0.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .in { max-width: 1120px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 17px; }
.brand svg { width: 24px; height: 24px; }
.top nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.top nav a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); }
.top nav a.dl { color: #0b0b0d; background: var(--text); padding: 8px 16px; border-radius: 10px; font-weight: 600; }
.foot { border-top: 1px solid var(--line); margin-top: 120px; }
.foot .in { max-width: 1120px; margin: 0 auto; padding: 36px 24px 48px; display: flex; flex-wrap: wrap; gap: 12px 28px; color: var(--text-3); font-size: 14px; }
.foot a { color: var(--text-2); text-decoration: none; }

/* article */
.post { max-width: 720px; margin: 0 auto; padding: 72px 24px 0; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.post h1 { font-size: clamp(34px, 5vw, 50px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; margin: 14px 0 18px; text-wrap: balance; }
.lede { font-size: 21px; line-height: 1.6; color: var(--text-2); }
.meta { margin-top: 22px; padding-bottom: 28px; border-bottom: 1px solid var(--line); color: var(--text-3); font-size: 14px; font-family: var(--mono); }
.post h2 { font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 650; margin: 56px 0 14px; text-wrap: balance; }
.post h3 { font-size: 20px; font-weight: 650; margin: 36px 0 8px; }
.post p, .post ul, .post ol { margin: 0 0 20px; }
.post ul, .post ol { padding-left: 22px; }
.post li { margin: 6px 0; }
.post strong { color: #fff; font-weight: 650; }
.post code { font-family: var(--mono); font-size: 0.86em; background: var(--panel); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.post pre { font-family: var(--mono); font-size: 14px; line-height: 1.6; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow-x: auto; margin: 0 0 24px; }
.post pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.post blockquote { border-left: 2px solid var(--accent); padding: 4px 0 4px 20px; color: var(--text-2); margin: 0 0 24px; }

/* wide figures break out of the text column */
figure { margin: 40px auto; width: min(1040px, calc(100vw - 48px)); position: relative; left: 50%; transform: translateX(-50%); }
figure.narrow { width: min(720px, calc(100vw - 48px)); }
figure img, figure video { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--panel); }
figcaption { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--text-3); text-align: center; text-wrap: balance; }

/* measured results */
.table { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text-2); font-weight: 600; background: var(--panel); }
tr:last-child td { border-bottom: 0; }
.ok { color: #4ade80; } .bad { color: #f87171; } .meh { color: #fbbf24; }

/* call to action at the end of a post */
.cta { margin-top: 56px; padding: 28px; border: 1px solid var(--line-strong); border-radius: 16px; background: linear-gradient(180deg, rgba(45, 212, 191, 0.07), rgba(6, 6, 7, 0)); }
.cta h2 { margin-top: 0; }
.cta .row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; height: 46px; padding: 0 22px; border-radius: 12px; font-weight: 600; font-size: 15px; text-decoration: none; }
.btn.primary { background: var(--text); color: #0b0b0d; }
.btn.ghost { border: 1px solid var(--line-strong); color: var(--text); }

/* blog index */
.list { max-width: 820px; margin: 0 auto; padding: 72px 24px 0; }
.list h1 { font-size: clamp(36px, 5vw, 52px); letter-spacing: -0.03em; line-height: 1.1; }
.card { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
/* height:auto beats the <img height> attribute (kept for layout-shift-free loading), so aspect-ratio applies */
.card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; align-self: start; border-radius: 12px; border: 1px solid var(--line); }
.card h2 { font-size: 23px; line-height: 1.25; letter-spacing: -0.015em; margin: 6px 0 8px; color: var(--text); }
.card p { color: var(--text-2); font-size: 16px; }
.card:hover h2 { color: var(--accent); }
@media (max-width: 640px) {
	body { font-size: 17px; }
	.card { grid-template-columns: 1fr; }
	.top nav a:not(.dl):not([aria-current]) { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
