:root{--bg:#fbf8f3;--fg:#2b2622;--muted:#6f655b;--link:#7a3b1d;--rule:#e2d9cc;--card:#fff}
@media (prefers-color-scheme:dark){:root{--bg:#1c1917;--fg:#e8e2d9;--muted:#a79d90;--link:#e0a67e;--rule:#3a342e;--card:#24201d}}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--fg);font:18px/1.7 Georgia,"Times New Roman",serif}
a{color:var(--link)}
.site-nav{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem 1.5rem;max-width:46rem;margin:0 auto;padding:1rem 16px;border-bottom:1px solid var(--rule);font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:.8rem;letter-spacing:.08em}
.site-nav .brand{font:italic 1.2rem Georgia,serif;letter-spacing:0;text-decoration:none;color:var(--fg)}
.site-nav ul{display:flex;flex-wrap:wrap;gap:.25rem 1.25rem;list-style:none;margin:0;padding:0}
.site-nav ul a{text-decoration:none;color:var(--fg);padding:.25rem 0;border-bottom:2px solid transparent}
.site-nav ul a:hover,.site-nav ul a[aria-current]{border-bottom-color:var(--link)}
main{max-width:46rem;margin:0 auto;padding:1.5rem 16px 3rem}
h1{font-size:2rem;line-height:1.25;margin:.5rem 0}
h2{font-size:1.6rem;line-height:1.3;margin:2.2rem 0 .6rem}
h3{font-size:1.3rem;line-height:1.3;margin:1.8rem 0 .5rem}
h4{font-size:1.1rem;margin:1.5rem 0 .4rem}
p{margin:0 0 1.1rem}
.meta{color:var(--muted);font:.85rem system-ui,sans-serif}
.post-body{overflow-wrap:anywhere}
figure{margin:1.5rem 0;text-align:center}
figure img{max-width:100%;height:auto}
figcaption{color:var(--muted);font-size:.9rem;font-style:italic;margin-top:.4rem}
.lede{color:var(--muted);font-style:italic;font-size:1.15rem}
.post-list{list-style:none;padding:0;margin:2rem 0}
.post-list li{background:var(--card);border:1px solid var(--rule);border-radius:6px;margin:0 0 1rem;padding:1rem 1.2rem}
.post-list h2{margin:0 0 .3rem;font-size:1.3rem}
.post-list p{margin:0 0 .4rem}
.actions a{display:inline-block;margin:0 1rem .5rem 0}
.site-footer{max-width:46rem;margin:0 auto;padding:1.5rem 16px 2.5rem;border-top:1px solid var(--rule);color:var(--muted);font:.8rem system-ui,sans-serif;text-align:center}
.site-footer p{margin:0 0 .4rem}
.site-footer .credit{font-size:.75rem}
.post-list li{display:flex;gap:1rem;align-items:flex-start}
.post-list .cover{width:7.5rem;height:5.6rem;object-fit:cover;border-radius:4px;flex:none}
@media(max-width:480px){.post-list li{flex-direction:column}.post-list .cover{width:100%;height:auto;aspect-ratio:4/3}}
/* Home: card grid, up to 4 across like the original Wix blog */
main.home{max-width:72rem}
main.home .post-head{max-width:46rem;margin-left:auto;margin-right:auto}
main.home .post-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:1.25rem}
main.home .post-list li{flex-direction:column;margin:0;padding:0;overflow:hidden}
main.home .post-list li>a{display:block}
main.home .post-list .cover{width:100%;height:auto;aspect-ratio:4/3;border-radius:0}
main.home .post-list li>div{padding:.9rem 1rem 1rem}
main.home .post-list h2{font-size:1.1rem}
/* Brand: Hosted by r/ExMormon (outline pill, option 2) */
:root{--brand:#D93A00}
@media (prefers-color-scheme:dark){:root{--brand:#FF5A1F}}
.credit{margin-top:.9rem}
a.hosted-by{display:inline-flex;align-items:center;gap:.45em;padding:.4em 1em;border:1.5px solid var(--brand);border-radius:999px;text-decoration:none;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;line-height:1.2}
a.hosted-by .hb-lead{font-size:.75rem;font-weight:500;color:var(--muted)}
a.hosted-by .hb-name{font-size:.9rem;font-weight:800;color:var(--brand)}
a.hosted-by:hover,a.hosted-by:focus-visible{background:color-mix(in srgb,var(--brand) 10%,transparent)}

/* Picture viewer (lightbox.js) */
a.zoom { display: block; cursor: zoom-in; }
.lb { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(20, 16, 12, .6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.lb.lb-open { display: flex; align-items: center; justify-content: center; animation: lb-fade .18s ease-out; }
.lb-frame { position: relative; display: flex; flex-direction: column; width: min(1200px, 94vw); height: 90vh; height: 90dvh; background: #fff; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.45); overflow: hidden; animation: lb-pop .2s ease-out; }
.lb-view { position: relative; flex: 1; overflow: hidden; background: #f3f1ee; touch-action: none; user-select: none; -webkit-user-select: none; }
.lb-img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; -webkit-user-drag: none; }
.lb-view.lb-can-drag { cursor: grab; }
.lb-view.lb-dragging { cursor: grabbing; }
.lb-bar { display: flex; align-items: center; justify-content: center; gap: .4rem; padding: .45rem .6rem; border-top: 1px solid #e4e0da; background: #fff; font: 14px/1 system-ui, sans-serif; }
.lb-btn { min-width: 2.4rem; height: 2.4rem; padding: 0 .7rem; border: 1px solid #d6d0c8; border-radius: 6px; background: #fff; color: #222; font: 600 1.15rem/1 system-ui, sans-serif; cursor: pointer; }
.lb-btn.lb-fit { font-size: .9rem; }
.lb-btn:hover:not(:disabled) { background: #f3f1ee; }
.lb-btn:disabled { opacity: .35; cursor: default; }
.lb-btn:focus-visible { outline: 2px solid #7a3b1d; outline-offset: 1px; }
.lb-close { margin-left: auto; font-size: 1.5rem; }
.lb-pct { min-width: 3.6rem; text-align: center; color: #444; font-variant-numeric: tabular-nums; }
.lb-bar::before { content: ""; flex: 0 0 2.4rem; margin-right: auto; }
html.lb-noscroll { overflow: hidden; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lb-pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lb.lb-open, .lb-frame { animation: none; } }
