/*
 * Zora Theme
 * Brand: indigo #3a2ad6 → magenta #9b1a9a → crimson #e0204a (from the Zora mark).
 */

:root {
	--z-header-h: 72px;
	--z-font: "Fira Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--z-font-display: "Fira Sans", ui-sans-serif, system-ui, sans-serif;
	--t-max: 1200px;
}

/* ------------------------------------------------------------ Base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--z-header-h) + 12px); }
body {
	margin: 0; background: var(--z-bg); color: var(--z-text); font-family: var(--z-font); font-size: 1rem; line-height: 1.5;
	-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--z-link); }
h1, h2, h3, h4 { font-family: var(--z-font-display); font-weight: 700; color: var(--z-text); }
button, input, select, textarea { font-family: inherit; }
::selection { background: color-mix(in srgb, var(--z-brand-mid) 25%, transparent); }
:focus-visible { outline: 2px solid var(--z-focus); outline-offset: 2px; }

.skip-link {
	position: absolute; left: 12px; top: -100px; z-index: 1000; background: var(--z-surface); color: var(--z-text);
	padding: 10px 16px; border-radius: 10px; box-shadow: var(--z-shadow-lg); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden;
	padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}

/* ------------------------------------------------------------ Header */

.site-header {
	position: sticky; top: 0; z-index: 95; height: var(--z-header-h);
	background: var(--z-glass-strong);
	backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px);
	border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--z-border); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 8px 24px -16px rgba(30,20,60,.18); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header__inner {
	max-width: 1280px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 16px;
}
.site-header__menu { display: none; }
.site-logo { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.site-logo img { height: 42px; width: auto; display: block; }
.site-logo__dark { display: none !important; }
.site-logo.is-footer img { height: 40px; }
.site-header__links { display: flex; gap: 4px; margin-left: 24px; }
.site-header__links a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--z-text); font-weight: 600; font-size: .95rem; }
.site-header__links a:hover { background: var(--z-surface); }
.site-header__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.site-header__me img { width: 36px; height: 36px; border-radius: 50%; display: block; object-fit: cover; box-shadow: 0 0 0 2px var(--z-surface), 0 0 0 4px color-mix(in srgb, var(--z-brand-mid) 40%, transparent); }
.site-scheme__moon { display: none; }
.site-scheme svg { display: block; }

/* ------------------------------------------------------------ Dark mode logo + toggle */

:root[data-theme="dark"] .site-logo__light { display: none !important; }
:root[data-theme="dark"] .site-logo__dark { display: block !important; }
:root[data-theme="dark"] .site-scheme__sun { display: none; }
:root[data-theme="dark"] .site-scheme__moon { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .site-logo__light { display: none !important; }
	:root:not([data-theme="light"]) .site-logo__dark { display: block !important; }
	:root:not([data-theme="light"]) .site-scheme__sun { display: none; }
	:root:not([data-theme="light"]) .site-scheme__moon { display: block; }
}

/* ------------------------------------------------------------ Footer */

.site-footer { border-top: 1px solid var(--z-border); background: var(--z-surface); backdrop-filter: var(--z-backdrop, none); margin-top: 48px; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--z-gradient); opacity: .55; }
.site-footer.is-slim { background: transparent; border: 0; margin: 0; backdrop-filter: none; }
.site-footer.is-slim::before { display: none; }
.site-footer__inner { max-width: var(--t-max); margin: 0 auto; padding: 0 24px; }
.site-footer__top { display: grid; grid-template-columns: minmax(240px, 1.1fr) 2fr; gap: 40px; padding: 52px 0 40px; }
.site-footer__brand { display: grid; gap: 12px; align-content: start; }
.site-footer__brand .site-logo img { height: 40px; }
.site-footer__brand p { color: var(--z-muted); margin: 0; max-width: 30ch; }
.site-footer__promise { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 8px 14px; border-radius: 999px; font-size: .88rem; font-weight: 650; text-decoration: none; color: var(--z-link, var(--z-brand-mid)); background: color-mix(in srgb, var(--z-brand-mid) 8%, transparent); border: 1px solid color-mix(in srgb, var(--z-brand-mid) 18%, transparent); }
.site-footer__promise:hover { background: color-mix(in srgb, var(--z-brand-mid) 14%, transparent); }
.site-footer__promise svg { width: 16px; height: 16px; }
.site-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; }
.site-footer__cols h2 { font-size: .95rem; font-weight: 750; letter-spacing: -.01em; color: var(--z-text); margin: 0 0 12px; }
.site-footer__cols a { display: block; color: var(--z-muted); text-decoration: none; padding: 5px 0; font-size: .95rem; }
.site-footer__cols a:hover { color: var(--z-link, var(--z-brand-mid)); }
.site-footer__menu { list-style: none; margin: 0; padding: 0; }
.site-footer__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 18px 0 22px; border-top: 1px solid var(--z-border); color: var(--z-muted); font-size: .85rem; }
.site-footer.is-slim .site-footer__bar { border: 0; justify-content: center; padding: 16px 0; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer.is-slim .site-footer__legal { justify-content: center; }
.site-footer__legal a { color: var(--z-muted); text-decoration: none; }
.site-footer__legal a:hover { color: var(--z-text); text-decoration: underline; }

/* ------------------------------------------------------------ Generic pages */

.site-content { padding: 40px 24px 64px; }
.site-content__inner { max-width: var(--t-max); margin: 0 auto; }
.site-content__inner.is-narrow { max-width: 760px; }
.site-content__inner.is-center { text-align: center; }
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -.03em; line-height: 1.1; margin: 0; }
.page-head__meta { color: var(--z-muted); margin: 8px 0; }
.entry-content { font-size: 1.07rem; line-height: 1.75; }
.entry-content h2 { font-size: 1.55rem; margin: 2em 0 .6em; letter-spacing: -.02em; }
.entry-content h3 { font-size: 1.2rem; margin: 1.6em 0 .5em; }
.entry-content img { border-radius: 14px; }
.entry-content blockquote { margin: 1.5em 0; padding: 4px 20px; border-left: 4px solid; border-image: var(--z-gradient) 1; color: var(--z-muted); }
.entry-media { margin: 0 0 24px; }
.entry-media img { border-radius: 18px; }
.post-list { display: grid; gap: 18px; }
.post-card { display: grid; grid-template-columns: 220px 1fr; gap: 20px; background: var(--z-surface); border: 1px solid var(--z-border); border-radius: 18px; overflow: hidden; }
.post-card:not(.has-post-thumbnail) { grid-template-columns: 1fr; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 20px; }
.post-card__body h2 { margin: 4px 0 8px; font-size: 1.3rem; }
.post-card__body h2 a { text-decoration: none; color: inherit; }
.post-card__meta { margin: 0; color: var(--z-muted); font-size: .85rem; }
.not-found { display: grid; justify-items: center; gap: 12px; padding: 60px 0; }
.not-found h1 { margin: 8px 0 0; font-size: 2rem; letter-spacing: -.02em; }
.not-found p { margin: 0 0 8px; color: var(--z-muted); }
.nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.nav-links .page-numbers { padding: 8px 14px; border-radius: 999px; background: var(--z-surface); border: 1px solid var(--z-border); text-decoration: none; color: var(--z-text); }
.nav-links .current { background: var(--z-text); color: var(--z-bg); }

/* ------------------------------------------------------------ Responsive */

@media (max-width: 1100px) {
	}
@media (max-width: 960px) {
	.site-footer__top { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
	.site-footer__bar { justify-content: center; text-align: center; }
	.site-footer__legal { justify-content: center; }
	.site-header__links { display: none; }
}
@media (max-width: 860px) {
	.site-header__inner { padding: 0 12px; gap: 8px; }
	.has-zora-social.zora-app .site-header__menu { display: inline-grid; }
		.site-logo img { height: 36px; }
}
@media (max-width: 640px) {
	.post-card { grid-template-columns: 1fr; }
	.site-header__actions .zora-btn.is-ghost { display: none; }
}

/* ------------------------------------------------------------ Gate (logged-out front page) */

.is-landing .site-header { background: transparent; border-color: transparent !important; box-shadow: none !important; backdrop-filter: none; }
.is-landing .site-header .site-logo, .is-landing .site-header__links, .is-landing .site-header__actions .zora-btn { display: none; }
.gate { position: relative; min-height: calc(100vh - var(--z-header-h) - 80px); display: grid; align-content: center; padding: 8px 24px 40px; overflow: hidden; }
.gate__glow { position: absolute; inset: -20% -10% auto; height: 120%; pointer-events: none; z-index: -1;
	background: radial-gradient(40% 50% at 18% 30%, color-mix(in srgb, var(--z-brand-1) 16%, transparent), transparent 70%),
	radial-gradient(35% 45% at 85% 25%, color-mix(in srgb, var(--z-brand-2) 13%, transparent), transparent 70%),
	radial-gradient(40% 40% at 60% 85%, color-mix(in srgb, var(--z-brand-mid) 10%, transparent), transparent 70%); }
.gate__inner { max-width: 1040px; width: 100%; margin: 0 auto; display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.gate__logo { height: 64px; width: auto; display: block; margin-bottom: 28px; }
.gate__logo.site-logo__dark { display: none; }
.gate h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); line-height: 1.06; letter-spacing: -.04em; margin: 0; font-weight: 800; }
.gate__lede { font-size: 1.15rem; line-height: 1.6; color: var(--z-muted); margin: 18px 0 22px; max-width: 48ch; }
.gate__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gate__points li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.gate__points li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--z-gradient); flex: none; }
.gate__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 26px; font-weight: 700; text-decoration: none; color: var(--z-link); }
.gate__more:hover { text-decoration: underline; }
.gate__card { background: var(--z-glass-strong); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8);
	border: 1px solid var(--z-glass-border); border-radius: 28px; padding: 32px; box-shadow: var(--z-shadow-lg), inset 0 1px 0 rgba(255,255,255,.7); display: grid; gap: 14px; }
.gate__card h2 { margin: 0 0 4px; font-size: 1.35rem; letter-spacing: -.02em; }
.gate__forgot { text-align: center; color: var(--z-link); font-weight: 600; text-decoration: none; font-size: .93rem; }
.gate__divider { display: flex; align-items: center; gap: 12px; color: var(--z-muted); font-size: .85rem; margin: 4px 0; }
.gate__divider::before, .gate__divider::after { content: ""; height: 1px; background: var(--z-border); flex: 1; }
.gate__age { margin: 0; text-align: center; color: var(--z-muted); font-size: .82rem; }
.gate__browse { max-width: 1040px; width: 100%; margin: 48px auto 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--z-muted); font-size: .92rem; }
.gate__browse a { padding: 7px 14px; border-radius: 999px; background: var(--z-glass); border: 1px solid var(--z-glass-border); text-decoration: none; color: var(--z-text); font-weight: 600; backdrop-filter: blur(12px); }
.gate__browse a:hover { background: var(--z-surface-solid); }
:root[data-theme="dark"] .gate__logo.site-logo__light { display: none; }
:root[data-theme="dark"] .gate__logo.site-logo__dark { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .gate__logo.site-logo__light { display: none; }
	:root:not([data-theme="light"]) .gate__logo.site-logo__dark { display: block; }
}
@media (max-width: 860px) {
	.gate__inner { grid-template-columns: 1fr; gap: 28px; }
	.gate__logo { height: 52px; margin-bottom: 18px; }
	.gate__points, .gate__more { display: none; }
	.gate__card { padding: 24px 20px; }
	.gate__browse { margin-top: 28px; }
}

/* Built-in documents (legal pages) */
.zora-public { padding: 32px 20px 64px; }

/* ------------------------------------------------------------ Header actions */

.site-header__actions .zora-icon-btn { flex: none; }
.site-header__actions .zora-usermenu { margin-left: 6px; }

/* ------------------------------------------------------------ Accessibility panel */

.a11y { position: relative; }
.a11y > summary { list-style: none; cursor: pointer; }
.a11y > summary::-webkit-details-marker { display: none; }
.a11y[open] > .a11y__trigger { background: var(--z-surface-2, var(--z-surface)); color: var(--z-link, var(--z-brand-mid)); }
.a11y__panel {
	position: absolute; right: 0; top: calc(100% + 10px); width: 300px; z-index: 120; padding: 16px;
	background: var(--z-surface-solid, #fff); border: 1px solid var(--z-border); border-radius: 18px; box-shadow: var(--z-shadow-lg, 0 20px 50px rgba(0,0,0,.15));
	display: grid; gap: 14px; font-size: .92rem;
}
.a11y__title { margin: 0; font-size: 1rem; font-weight: 750; display: flex; align-items: center; gap: 8px; }
.a11y__row { display: grid; gap: 8px; }
.a11y__row > span, .a11y__row > legend { font-weight: 650; padding: 0; }
fieldset.a11y__row { border: 0; margin: 0; padding: 0; }
.a11y__seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--z-surface-2, rgba(0,0,0,.04)); }
.a11y__seg label { position: relative; display: grid; place-items: center; height: 36px; border-radius: 9px; cursor: pointer; font-weight: 700; }
.a11y__seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.a11y__seg label:has(input:checked) { background: var(--z-surface-solid, #fff); box-shadow: 0 1px 4px rgba(0,0,0,.12); color: var(--z-link, var(--z-brand-mid)); }
.a11y__seg label:has(input:focus-visible) { outline: 2px solid var(--z-brand-mid); outline-offset: 2px; }
.a11y__toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; padding: 4px 0; }
.a11y__toggle small { display: block; color: var(--z-muted); font-size: .8rem; }
.a11y__toggle input { appearance: none; -webkit-appearance: none; flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--z-border-strong, rgba(0,0,0,.18)); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.a11y__toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.a11y__toggle input:checked { background: var(--z-gradient, #9b1a9a); }
.a11y__toggle input:checked::after { transform: translateX(18px); }
.a11y__toggle input:focus-visible { outline: 2px solid var(--z-brand-mid); outline-offset: 2px; }
.a11y__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--z-border); padding-top: 12px; }
.a11y__foot a { color: var(--z-link, var(--z-brand-mid)); font-weight: 650; font-size: .85rem; }
.a11y__reset { background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 650; color: var(--z-muted); cursor: pointer; }
.a11y__reset:hover { color: var(--z-text); }
@media (max-width: 520px) { .a11y__panel { position: fixed; left: 12px; right: 12px; width: auto; top: calc(var(--z-header-h) + 6px); } }

/* Accessibility modes (set on <html> before paint, stored per device) */

html[data-a11y-text="lg"] { font-size: 112.5%; }
html[data-a11y-text="xl"] { font-size: 125%; }
html[data-a11y-contrast="high"] {
	--z-muted: #3d3746; --z-border: rgba(20, 10, 40, .32); --z-border-strong: rgba(20, 10, 40, .55);
	--z-surface: #fff; --z-glass: #fff; --z-glass-strong: #fff; --z-bg: #fff; --z-link: #4a0044;
}
html[data-a11y-contrast="high"][data-theme="dark"] {
	--z-text: #fff; --z-muted: #e2dce8; --z-border: rgba(255, 255, 255, .4); --z-border-strong: rgba(255, 255, 255, .65);
	--z-surface: #000; --z-surface-solid: #000; --z-surface-2: #1a1a1a; --z-glass: #000; --z-glass-strong: #000; --z-bg: #000; --z-link: #ffb3ef;
}
@media (prefers-color-scheme: dark) {
	html[data-a11y-contrast="high"]:not([data-theme="light"]) {
		--z-text: #fff; --z-muted: #e2dce8; --z-border: rgba(255, 255, 255, .4); --z-border-strong: rgba(255, 255, 255, .65);
		--z-surface: #000; --z-surface-solid: #000; --z-surface-2: #1a1a1a; --z-glass: #000; --z-glass-strong: #000; --z-bg: #000; --z-link: #ffb3ef;
	}
}
html[data-a11y-contrast="high"] *, html[data-a11y-contrast="high"] *::before { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
html[data-a11y-contrast="high"] body { background: var(--z-bg) !important; }
html[data-a11y-contrast="high"] .zora-card, html[data-a11y-contrast="high"] .site-header { border-width: 1.5px; }
html[data-a11y-contrast="high"] :focus-visible { outline: 3px solid currentColor !important; outline-offset: 2px; }
html[data-a11y-motion="reduce"] *, html[data-a11y-motion="reduce"] *::before, html[data-a11y-motion="reduce"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-a11y-spacing="wide"] body { letter-spacing: .06em; word-spacing: .14em; line-height: 1.85; }
html[data-a11y-spacing="wide"] p, html[data-a11y-spacing="wide"] li { margin-bottom: 1.1em; }
html[data-a11y-links="underline"] a:not(.zora-btn):not(.site-logo) { text-decoration: underline !important; text-underline-offset: 3px; }

/* ------------------------------------------------------------ Brand scrollbars */

html { scrollbar-color: color-mix(in srgb, var(--z-brand-mid, #9b1a9a) 55%, transparent) transparent; }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--z-brand-mid, #9b1a9a) 45%, transparent) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 999px; border: 3px solid transparent; background: linear-gradient(180deg, #3a2ad6, #9b1a9a 55%, #e0204a) padding-box; opacity: .8; }
::-webkit-scrollbar-thumb:hover { border-width: 2px; }
::-webkit-scrollbar-corner { background: transparent; }
::selection { background: color-mix(in srgb, #9b1a9a 22%, transparent); }
