/* Writestead blog themes. One stylesheet; each theme sets variables and a few layout rules on
   html[data-theme]. The accent and fonts can be overridden from the dashboard. */
@font-face {
    font-family: "Geist";
    src: url("/_ws/fonts/geist.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --accent: #6d4aff;
    --bg: #ffffff;
    --fg: #18162b;
    --muted: #6b6883;
    --line: rgba(24, 22, 43, 0.09);
    --card: #ffffff;
    --soft: #f5f4fa;
    --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-heading: var(--font-body);
    --radius: 14px;
    --measure: 680px;
    --wide: 1120px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --title-weight: 650;
    --title-tracking: -0.02em;
}

@media (prefers-color-scheme: dark) {
    html[data-scheme="auto"] {
        --bg: #131218;
        --fg: #eceaf5;
        --muted: #a19eb6;
        --line: rgba(255, 255, 255, 0.1);
        --card: #1c1b23;
        --soft: #1f1e27;
        color-scheme: dark;
    }
}
html[data-scheme="dark"] {
    --bg: #131218;
    --fg: #eceaf5;
    --muted: #a19eb6;
    --line: rgba(255, 255, 255, 0.1);
    --card: #1c1b23;
    --soft: #1f1e27;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; letter-spacing: var(--title-tracking); text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -64px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 16px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { width: 100%; max-width: calc(var(--measure) + 48px); margin: 0 auto; padding: 0 24px; }
.wrap-wide { width: 100%; max-width: calc(var(--wide) - 120px); margin: 0 auto; padding: 0 24px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px;
    border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-size: 15px; font-weight: 600;
    line-height: 1.4; text-decoration: none; cursor: pointer; white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.12);
    transition: transform 300ms var(--ease), filter 300ms var(--ease), background-color 300ms var(--ease);
}
.btn:hover { color: #fff; filter: brightness(0.92); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--fg); box-shadow: none; }
.btn-ghost:hover { color: var(--fg); background: var(--soft); filter: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { font-family: var(--font-heading); font-weight: 700; font-size: 19px; text-decoration: none; letter-spacing: -0.01em; }
.brand img { max-height: 36px; width: auto; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a { padding: 6px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; transition: color 200ms var(--ease), background-color 200ms var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); background: var(--soft); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-link { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; color: var(--muted); }
.icon-link:hover { background: var(--soft); color: var(--fg); }
@media (max-width: 720px) {
    .header-row { flex-wrap: wrap; gap: 8px 16px; padding-top: 8px; padding-bottom: 8px; }
    .nav { order: 3; flex-basis: 100%; }
    .hide-sm { display: none; }
}

/* Home hero */
.hero { padding: 72px 0 40px; }
.hero-title { font-size: clamp(36px, 6vw, 56px); margin: 0; font-weight: var(--title-weight); }
.hero-text { font-size: 20px; color: var(--muted); max-width: 640px; margin: 16px 0 0; }
.hero-cover { position: relative; color: #fff; padding: 120px 0 96px; background: #222 var(--cover) center / cover; }
.hero-cover::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); }
.hero-cover .wrap { position: relative; }
.hero-cover .hero-text { color: rgba(255, 255, 255, 0.85); }

.content-area { display: flex; gap: 48px; padding-bottom: 48px; }
.feed { flex: 1; min-width: 0; }
.section-title { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 32px 0 16px; font-weight: 600; font-family: var(--font-body); }
.featured { margin-bottom: 16px; }
.featured .grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.empty { color: var(--muted); padding: 48px 0; }

/* Post cards */
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); text-decoration: none; margin: 0 0 8px; }
.post-card-title { font-size: 24px; margin: 0 0 8px; font-weight: var(--title-weight); }
.post-card-title a { text-decoration: none; }
.post-card-excerpt { color: var(--muted); margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.byline a { text-decoration: none; color: var(--fg); font-weight: 500; }
.dot { opacity: 0.5; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-size: 12px; font-weight: 600; }

.list { display: flex; flex-direction: column; }
.post-card-row { display: flex; gap: 24px; align-items: flex-start; padding: 28px 0; box-shadow: 0 1px 0 var(--line); }
.post-card-row .post-card-body { flex: 1; min-width: 0; }
.post-card-thumb { flex-shrink: 0; width: 160px; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.post-card-thumb img, .post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.post-card:hover img { transform: scale(1.03); }
@media (max-width: 600px) { .post-card-thumb { width: 96px; } .post-card-title { font-size: 20px; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.post-card-card { display: flex; flex-direction: column; gap: 16px; }
.post-card-image { display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.post-card-card .post-card-title { font-size: 21px; }
.magazine { display: flex; flex-direction: column; gap: 40px; }
.post-card-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.post-card-hero .post-card-image { aspect-ratio: 16 / 10; }
.post-card-hero .post-card-title { font-size: clamp(28px, 4vw, 40px); }
@media (max-width: 800px) { .post-card-hero { grid-template-columns: 1fr; } }

.pagination { display: flex; justify-content: space-between; align-items: center; padding: 32px 0; font-size: 15px; }

/* Post */
.post-header { padding-top: 64px; padding-bottom: 32px; }
.post-title { font-size: clamp(34px, 5.5vw, 52px); margin: 0 0 16px; font-weight: var(--title-weight); }
.post-excerpt { font-size: 21px; color: var(--muted); margin: 0 0 24px; line-height: 1.5; }
.is-page .post-header { padding-bottom: 8px; }
.post-cover { margin: 0 auto 40px; }
.post-cover img { width: 100%; border-radius: var(--radius); }
.post-content { font-size: 19px; line-height: 1.75; }
.post-content > * + * { margin-top: 1.4em; }
.post-content h2 { font-size: 30px; margin-top: 2em; }
.post-content h3 { font-size: 24px; margin-top: 1.8em; }
.post-content p, .post-content ul, .post-content ol { margin-bottom: 0; }
.post-content a { color: var(--accent); }
.post-content blockquote { margin-left: 0; padding: 4px 0 4px 24px; box-shadow: inset 3px 0 0 var(--accent); color: var(--muted); font-size: 21px; }
.post-content figure { margin-left: 0; margin-right: 0; }
.post-content figure img { border-radius: var(--radius); margin: 0 auto; }
.post-content figcaption { text-align: center; color: var(--muted); font-size: 15px; margin-top: 8px; }
.post-content hr { border: 0; height: 1px; background: var(--line); margin: 3em 0; }
.post-content table { width: 100%; border-collapse: collapse; font-size: 16px; }
.post-content th, .post-content td { padding: 8px 12px; text-align: left; box-shadow: inset 0 -1px 0 var(--line); }
.post-content :not(pre) > code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.88em; padding: 2px 6px; border-radius: 6px; background: var(--soft); }
.post-content.is-gated { position: relative; max-height: 520px; overflow: hidden; }
.post-content.is-gated::after { content: ""; position: absolute; inset: auto 0 0 0; height: 200px; background: linear-gradient(transparent, var(--bg)); }

pre.code { position: relative; margin-left: -12px; margin-right: -12px; padding: 20px; border-radius: 12px; background: #16141f; color: #e8e6f3; overflow-x: auto; font-size: 14.5px; line-height: 1.6; }
pre.code code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.code-lang { position: absolute; top: 8px; right: 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #8f8aa8; font-family: var(--font-body); }
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-type { color: #c792ea; }
.hljs-string, .hljs-attr, .hljs-template-tag, .hljs-addition { color: #c3e88d; }
.hljs-number, .hljs-literal, .hljs-symbol { color: #f78c6c; }
.hljs-comment, .hljs-quote, .hljs-deletion { color: #757394; }
.hljs-title, .hljs-section, .hljs-function .hljs-title { color: #82aaff; }
.hljs-variable, .hljs-params, .hljs-tag, .hljs-name { color: #f07178; }
.hljs-meta, .hljs-property { color: #89ddff; }

.embed { margin-left: 0; margin-right: 0; }
.embed-video, .embed-code { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.embed-video iframe, .embed-code iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-code { aspect-ratio: 16 / 11; }
.embed-tweet .twitter-tweet { margin: 0 auto; }

.paywall { margin-top: 0; margin-bottom: 48px; padding: 32px; border-radius: calc(var(--radius) + 4px); background: var(--soft); text-align: center; position: relative; z-index: 1; }
.paywall h2 { font-size: 24px; margin: 0 0 8px; }
.paywall p { color: var(--muted); margin: 0 0 24px; }
.paywall-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.post-footer { padding-top: 40px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 24px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 4px 12px; border-radius: 999px; background: var(--soft); text-decoration: none; font-size: 14px; }
.share { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: 15px; }
.share a { color: var(--muted); text-decoration: none; }
.share a:hover { color: var(--accent); }
.author-box { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--radius); background: var(--soft); }
.author-box img, .author-box .avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.author-box .avatar { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-weight: 700; }
.author-box a { text-decoration: none; }
.author-box p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.related { padding-top: 32px; padding-bottom: 64px; }

/* Subscribe */
.subscribe { margin: 48px 0; padding: 40px 32px; border-radius: calc(var(--radius) + 6px); background: var(--soft); text-align: center; }
.subscribe h2 { font-size: 26px; margin: 0 0 8px; }
.subscribe p { margin: 0 0 24px; color: var(--muted); }
.subscribe-compact { margin: 32px 0 0; padding: 0; background: none; text-align: left; }
.subscribe-compact h2 { display: none; }
.subscribe-compact p:first-of-type { display: none; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 480px; margin: 0 auto; }
.subscribe-compact .subscribe-form { justify-content: flex-start; margin: 0; }
.subscribe-form input[type="email"], input, textarea {
    flex: 1 1 220px; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 10px; background: var(--card); color: var(--fg);
    font: inherit; font-size: 16px; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, 0.04); transition: box-shadow 200ms var(--ease);
}
input:focus, textarea:focus { outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
input[type="checkbox"], input[type="radio"] { flex: none; min-height: 0; width: 18px; height: 18px; accent-color: var(--accent); box-shadow: none; }
.form-status { flex-basis: 100%; margin: 4px 0 0; font-size: 14px; min-height: 20px; color: var(--muted); }
.form-status[data-tone="ok"] { color: #15803d; }
.form-status[data-tone="error"] { color: #dc2626; }
.cf-turnstile { flex-basis: 100%; display: flex; justify-content: center; }
.label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
.check { display: flex; gap: 8px; align-items: center; margin: 16px 0; font-size: 15px; }

/* Comments */
.comments { padding-top: 24px; padding-bottom: 48px; }
.comment { padding: 16px 0; box-shadow: 0 1px 0 var(--line); }
.comment-meta { display: flex; gap: 8px; align-items: baseline; font-size: 15px; }
.comment p { margin: 6px 0 0; white-space: pre-wrap; }
.comment-form { display: flex; flex-direction: column; gap: 4px; margin-top: 24px; }
.comment-form textarea { resize: vertical; }
.comment-form .btn { align-self: flex-start; margin-top: 12px; }

/* Listing and utility pages */
.page-header { padding-top: 64px; padding-bottom: 24px; }
.page-header h1 { font-size: clamp(32px, 5vw, 48px); margin: 0; font-weight: var(--title-weight); }
.page-description { color: var(--muted); font-size: 19px; margin: 12px 0 0; }
.page-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 16px; }
.archive { padding-bottom: 64px; }
.archive-year { font-size: 22px; margin: 40px 0 8px; }
.archive ul { list-style: none; padding: 0; margin: 0; }
.archive li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; box-shadow: 0 1px 0 var(--line); }
.archive li a { text-decoration: none; }
.archive time { color: var(--muted); font-size: 14px; white-space: nowrap; }
.search-form { display: flex; gap: 8px; margin-top: 24px; max-width: 560px; }
.message, .waitlist { padding-top: 96px; padding-bottom: 96px; text-align: center; }
.message h1, .waitlist h1 { font-size: clamp(32px, 5vw, 48px); margin: 0 0 12px; }
.message p { color: var(--muted); margin: 0 0 24px; }
.waitlist { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
.waitlist-logo { max-height: 56px; margin: 0 auto 24px; }
.waitlist .subscribe-form { margin-top: 32px; }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; padding-bottom: 64px; max-width: 920px; }
.tier { padding: 28px; border-radius: calc(var(--radius) + 4px); background: var(--soft); display: flex; flex-direction: column; gap: 8px; }
.tier h2 { margin: 0; font-size: 22px; }
.tier p { margin: 0; }
.tier.is-highlighted { box-shadow: 0 0 0 2px var(--accent); }
.tier .subscribe-form, .tier form { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; max-width: none; }
.price { font-size: 32px; font-weight: 700; }
.price span { font-size: 15px; font-weight: 400; color: var(--muted); }
.benefits { padding-left: 20px; margin: 8px 0 0; }
.interval { display: flex; gap: 16px; font-size: 15px; }
.interval label { display: flex; gap: 6px; align-items: center; }
.account { display: flex; flex-direction: column; gap: 16px; padding-bottom: 64px; }
.account-card { padding: 24px; border-radius: var(--radius); background: var(--soft); }
.account-card h2 { font-size: 18px; margin: 0 0 12px; }
.account-card input { width: 100%; }
.embed-form { padding: 4px; }

.docs-sidebar { position: sticky; top: 96px; align-self: flex-start; width: 220px; flex-shrink: 0; display: none; flex-direction: column; gap: 2px; padding-top: 32px; }
.docs-sidebar a { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; text-decoration: none; font-size: 15px; color: var(--muted); }
.docs-sidebar a:hover { background: var(--soft); color: var(--fg); }
.docs-sidebar span { font-size: 13px; opacity: 0.7; }

/* Footer */
.site-footer { margin-top: 48px; padding: 48px 0 32px; background: var(--soft); font-size: 15px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-brand p { margin: 8px 0 0; color: var(--muted); max-width: 360px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--fg); }
.footer-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 32px; color: var(--muted); font-size: 13px; }
.powered { color: var(--muted); text-decoration: none; }

/* ---------- Themes ---------- */

/* Journal: warm paper and serif type. */
html[data-theme="journal"] {
    --bg: #fbf7f0; --fg: #2b2118; --muted: #7a6a58; --soft: #f3ece0; --card: #fffdf8; --line: rgba(43, 33, 24, 0.12);
    --font-heading: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; --font-body: var(--font-heading);
    --title-weight: 600; --title-tracking: -0.01em; --radius: 4px;
}
html[data-theme="journal"] .post-content { font-size: 20px; }
html[data-theme="journal"] .hero { text-align: center; }
html[data-theme="journal"] .hero-text { margin-left: auto; margin-right: auto; font-style: normal; }

/* Letter: newsletter-first, narrow column, subscribe box up front. */
html[data-theme="letter"] { --bg: #f4f7f6; --fg: #10201d; --muted: #5a6e69; --soft: #e8efed; --card: #ffffff; --wide: 760px; --radius: 12px; }
html[data-theme="letter"] .hero { text-align: center; padding-top: 88px; }
html[data-theme="letter"] .hero-text { margin-left: auto; margin-right: auto; }
html[data-theme="letter"] .subscribe-compact .subscribe-form { justify-content: center; margin: 0 auto; }
html[data-theme="letter"] .grid { grid-template-columns: 1fr; }

/* Midnight: dark with a soft glow. */
html[data-theme="midnight"] { --bg: #0d0b16; --fg: #ece9ff; --muted: #a39fc0; --soft: #17142a; --card: #17142a; --line: rgba(236, 233, 255, 0.1); color-scheme: dark; }
html[data-theme="midnight"] .hero { background: radial-gradient(60% 120% at 20% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); }
html[data-theme="midnight"] .post-card-card { padding: 12px; border-radius: calc(var(--radius) + 6px); background: var(--card); }

/* Paper: magazine, tight grid, bold sans headlines. */
html[data-theme="paper"] { --radius: 2px; --title-weight: 800; --title-tracking: -0.03em; }
html[data-theme="paper"] .site-header { box-shadow: 0 2px 0 var(--fg); }
html[data-theme="paper"] .hero { padding-top: 40px; padding-bottom: 24px; }
html[data-theme="paper"] .hero-title { text-transform: uppercase; font-size: clamp(32px, 6vw, 64px); }
html[data-theme="paper"] .eyebrow { color: var(--accent); }

/* Lens: photo-first, edge to edge images on dark. */
html[data-theme="lens"] { --bg: #111111; --fg: #fafafa; --muted: #a3a3a3; --soft: #1c1c1c; --card: #1c1c1c; --line: rgba(255, 255, 255, 0.1); --wide: 1400px; --radius: 0px; color-scheme: dark; }
html[data-theme="lens"] .grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 4px; }
html[data-theme="lens"] .post-card-card { position: relative; gap: 0; }
html[data-theme="lens"] .post-card-card .post-card-image { aspect-ratio: 4 / 5; }
html[data-theme="lens"] .post-card-card .post-card-body { position: absolute; inset: auto 0 0 0; padding: 48px 20px 20px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)); pointer-events: none; }
html[data-theme="lens"] .post-card-card .post-card-body a { pointer-events: auto; }
html[data-theme="lens"] .post-card-card .post-card-excerpt, html[data-theme="lens"] .post-card-card .byline { display: none; }
html[data-theme="lens"] .post-cover { max-width: none; padding: 0; }

/* Manual: docs-style with a topic sidebar and roomy code. */
html[data-theme="manual"] { --bg: #f8fafc; --fg: #0f172a; --muted: #64748b; --soft: #eef2f7; --card: #ffffff; --radius: 10px; --measure: 760px; }
html[data-theme="manual"] .docs-sidebar { display: flex; }
html[data-theme="manual"] .hero { padding-bottom: 8px; }
html[data-theme="manual"] .post-card-row { padding: 20px 0; }
@media (max-width: 860px) { html[data-theme="manual"] .docs-sidebar { display: none; } }

/* Arcade: retro, monospace and chunky shadows. */
html[data-theme="arcade"] {
    --bg: #fff8e7; --fg: #1d1a14; --muted: #6c6252; --soft: #ffefc6; --card: #ffffff; --line: rgba(29, 26, 20, 0.2);
    --font-body: ui-monospace, "SF Mono", Menlo, Consolas, monospace; --font-heading: var(--font-body); --radius: 0px; --title-weight: 800; --title-tracking: -0.04em;
}
html[data-theme="arcade"] body { font-size: 16px; }
html[data-theme="arcade"] .btn { border-radius: 0; box-shadow: 4px 4px 0 var(--fg); }
html[data-theme="arcade"] .btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--fg); }
html[data-theme="arcade"] .post-card-row { box-shadow: none; padding: 20px; margin-bottom: 16px; background: var(--card); outline: 2px solid var(--fg); box-shadow: 6px 6px 0 var(--accent); }
html[data-theme="arcade"] .subscribe, html[data-theme="arcade"] .author-box { outline: 2px solid var(--fg); box-shadow: 6px 6px 0 var(--fg); }

/* Bloom: colorful gradient header, rounded cards. */
html[data-theme="bloom"] { --bg: #fff5fb; --fg: #2a1033; --muted: #7d5f86; --soft: #ffe8f5; --card: #ffffff; --radius: 22px; }
html[data-theme="bloom"] .hero { color: #fff; padding: 96px 0 80px; background: radial-gradient(80% 140% at 0% 0%, #ffb547 0%, transparent 50%), radial-gradient(80% 140% at 100% 0%, #7c3aed 0%, transparent 55%), var(--accent); }
html[data-theme="bloom"] .hero-text { color: rgba(255, 255, 255, 0.88); }
html[data-theme="bloom"] .hero .subscribe-form input { box-shadow: none; }
html[data-theme="bloom"] .hero .btn { background: #2a1033; }
html[data-theme="bloom"] .hero .form-status { color: #fff; }
html[data-theme="bloom"] .post-card-card { padding: 12px; background: var(--card); border-radius: calc(var(--radius) + 8px); box-shadow: 0 8px 32px rgba(219, 39, 119, 0.08); }

/* Press: editorial serif headlines, classic newspaper rule. */
html[data-theme="press"] {
    --bg: #fdfcf9; --fg: #141414; --muted: #5c5c5c; --soft: #f3f1ea; --card: #ffffff; --radius: 0px;
    --font-heading: "Iowan Old Style", "Times New Roman", Georgia, serif; --title-weight: 700; --title-tracking: -0.02em;
}
html[data-theme="press"] .site-header { box-shadow: 0 1px 0 var(--fg), 0 4px 0 var(--bg), 0 5px 0 var(--fg); }
html[data-theme="press"] .brand { font-size: 26px; font-family: var(--font-heading); }
html[data-theme="press"] .hero { text-align: center; }
html[data-theme="press"] .hero-text { margin-left: auto; margin-right: auto; }
html[data-theme="press"] .eyebrow { color: var(--fg); }
html[data-theme="press"] .post-content { font-family: var(--font-heading); font-size: 20px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
