/* PromptBulletin theme. Tokens copied from the old app/globals.css. */

:root {
	--bg:          #0a0a0b;
	--bg2:         #111114;
	--bg3:         #18181c;
	--border:      rgba(255,255,255,0.08);
	--border2:     rgba(255,255,255,0.13);
	--text:        #f0ede8;
	--text2:       #a09a94;
	--text3:       #6b6460;
	--accent:      oklch(72% 0.19 52);
	--accent2:     oklch(72% 0.19 198);
	--accent-dim:  oklch(72% 0.19 52 / 0.15);
	--accent2-dim: oklch(72% 0.19 198 / 0.12);
	--green:       oklch(72% 0.18 145);
	--green-dim:   oklch(72% 0.18 145 / 0.13);
	--red:         oklch(65% 0.2 25);
	--red-dim:     oklch(65% 0.2 25 / 0.13);

	--font-space: "Space Grotesk", system-ui, sans-serif;
	--font-inter: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-lora:  "Lora", Georgia, serif;

	--nav-h: 64px;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 64px); }
body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-inter);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip; /* clip, not hidden: hidden would break position: sticky */
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.pb-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--accent); color: #000; border-radius: 8px; font-weight: 600; }
.pb-skip:focus { left: 8px; }

.pb-container { max-width: 1280px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.pb-dim { color: var(--text3); font-size: 13px; }
.pb-small { font-size: 12px; }
.pb-sep { color: var(--border2); }
.pb-label { font-size: 12px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.pb-h2 { font-family: var(--font-space); font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; margin-bottom: 20px; }
.pb-h3 { font-family: var(--font-space); font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; margin-bottom: 16px; }
.pb-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Header ─────────────────────────────────────────────────────── */
.pb-nav {
	position: fixed; top: 0; left: 0; right: 0; z-index: 50;
	padding: 0 24px;
	border-bottom: 1px solid transparent;
	transition: background 0.3s, border-color 0.3s;
}
.pb-nav.is-scrolled, .pb-nav.is-open { background: rgba(10,10,11,0.92); border-bottom-color: var(--border); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.admin-bar .pb-nav { top: 32px; }
/* Three columns keep the links centred, as they were when log-in buttons filled the right side. */
.pb-nav__inner { max-width: 1280px; margin: 0 auto; height: var(--nav-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.pb-nav__brand { justify-self: start; }
.pb-nav__toggle { justify-self: end; grid-column: 3; }
.pb-nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-space); font-weight: 700; font-size: 17px; letter-spacing: -0.025em; color: var(--text); }
.pb-nav__links { display: flex; align-items: center; gap: 4px; }
.pb-nav__link { padding: 6px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--text2); border: 1px solid transparent; transition: all 0.15s; }
.pb-nav__link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.pb-nav__link.is-cta { color: var(--accent); border-color: var(--accent-dim); }
/* Dropdown (e.g. AI Directory): opens on hover, focus or click. */
.pb-nav__drop { position: relative; }
.pb-nav__drop-btn { display: inline-flex; align-items: center; gap: 6px; background: none; font-family: inherit; cursor: pointer; }
.pb-nav__drop-btn svg { transition: transform 0.15s; }
.pb-nav__panel {
	position: absolute; top: calc(100% + 8px); left: 50%; z-index: 60; width: 300px; padding: 8px;
	transform: translate(-50%, 4px); opacity: 0; visibility: hidden; transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
	border-radius: 14px; background: var(--bg2); border: 1px solid var(--border2); box-shadow: 0 18px 50px rgba(0,0,0,0.45);
}
/* Bridges the gap so moving the mouse down to the panel doesn't close it. */
.pb-nav__panel::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.pb-nav__drop:hover .pb-nav__panel, .pb-nav__drop:focus-within .pb-nav__panel, .pb-nav__drop.is-open .pb-nav__panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.pb-nav__drop:hover .pb-nav__drop-btn svg, .pb-nav__drop.is-open .pb-nav__drop-btn svg { transform: rotate(180deg); }
.pb-nav__panel-link { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; text-decoration: none; transition: background 0.15s; }
.pb-nav__panel-link:hover { background: rgba(255,255,255,0.05); }
.pb-nav__panel-icon { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--accent-dim); color: var(--accent); }
.pb-nav__panel-title { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.pb-nav__panel-desc { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--text3); }
.pb-nav__toggle { display: none; padding: 4px; background: none; border: 0; color: var(--text2); cursor: pointer; }
.pb-nav__toggle-close { display: none; }
.pb-nav.is-open .pb-nav__toggle-open { display: none; }
.pb-nav.is-open .pb-nav__toggle-close { display: inline; }
.pb-nav__mobile { padding: 0 0 24px; border-top: 1px solid var(--border); }
.pb-nav__mobile-link { display: block; padding: 12px 0; font-size: 15px; font-weight: 500; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.pb-nav__mobile-link.is-heading { padding-bottom: 4px; border-bottom: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text3); }
.pb-nav__mobile-link.is-child { padding-left: 14px; }
@media (max-width: 767px) {
	.pb-nav__links { display: none; }
	.pb-nav__toggle { display: inline-flex; }
}
@media (max-width: 782px) { .admin-bar .pb-nav { top: 46px; } }

/* ── Footer ─────────────────────────────────────────────────────── */
.pb-footer { padding: 48px 24px 32px; border-top: 1px solid var(--border); background: var(--bg2); }
.pb-footer__inner { max-width: 1280px; margin: 0 auto; }
.pb-footer__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 48px; }
.pb-footer__logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-family: var(--font-space); font-weight: 700; font-size: 16px; }
.pb-footer__brand p { margin: 0; font-size: 13.5px; line-height: 1.7; max-width: 280px; color: var(--text3); }
.pb-footer__col { display: flex; flex-direction: column; gap: 10px; }
.pb-footer__title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text2); margin-bottom: 6px; }
.pb-footer__link { font-size: 13.5px; color: var(--text3); text-decoration: none; transition: color 0.15s; }
.pb-footer__link:hover { color: var(--text); }
.pb-footer__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text3); }
.pb-footer__legal { display: flex; gap: 20px; }
.pb-footer__legal .pb-footer__link { font-size: 13px; }
@media (max-width: 767px) {
	.pb-footer__grid { grid-template-columns: repeat(2, 1fr); }
	.pb-footer__brand { grid-column: span 2; }
}

/* ── Shared components ──────────────────────────────────────────── */
.pb-chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 100px; }
.pb-chip--accent { background: var(--accent-dim); color: var(--accent); border: 1px solid oklch(72% 0.19 52 / 0.3); }
.pb-chip--lg { font-size: 13px; font-weight: 500; padding: 5px 14px; border-color: oklch(72% 0.19 52 / 0.25); }
.pb-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pb-pill { font-size: 12px; font-weight: 500; padding: 4px 11px; border-radius: 8px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text2); }
.pb-stars { display: inline-flex; gap: 2px; }
.pb-stars .is-on { color: var(--accent); }
.pb-stars .is-off { color: var(--text3); }
.pb-btn {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px; border-radius: 11px; font: 700 14px var(--font-inter);
	text-decoration: none; cursor: pointer; transition: opacity 0.15s, background 0.15s;
}
.pb-btn--primary { background: var(--accent); color: #000; border: 0; }
.pb-btn--primary:hover { opacity: 0.88; }
.pb-btn--ghost { padding: 10px; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text2); font-size: 13px; font-weight: 600; }
.pb-btn--ghost:hover { background: rgba(255,255,255,0.07); }
.pb-btn--sm { padding: 9px; border-radius: 8px; font-size: 13px; }
.pb-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.pb-card--alt { background: var(--bg3); }

/* Generic page fallback */
.pb-page { padding: 140px 0 80px; }
.pb-prose { max-width: 760px; font-family: var(--font-lora); color: var(--text2); line-height: 1.85; }
.pb-prose h1 { font-family: var(--font-space); color: var(--text); margin-bottom: 24px; }
.pb-prose h1 a { text-decoration: none; }
