/* Journoist App Management. Everything is scoped to .jcp-page so the theme is left alone. */
.jcp-page {
	--jcp-ink: #14181f;
	--jcp-muted: #4b5563;
	--jcp-line: #e1e5ea;
	--jcp-soft: #f3f5f8;
	--jcp-card: #ffffff;
	--jcp-brand: #1a4fd6;
	--jcp-brand-dark: #153fae;
	--jcp-brand-tint: #eaf0ff;
	--jcp-brand-ink: #ffffff;
	--jcp-ok: #0b6b3a;
	--jcp-err: #a4161a;
	--jcp-radius: 16px;
	--jcp-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 6px 20px rgba(16, 24, 40, 0.05);
	color: var(--jcp-ink);
	line-height: 1.65;
}
.jcp-page *, .jcp-page *::before, .jcp-page *::after { box-sizing: border-box; }
.jcp-wrap { max-width: 1080px; margin: 0 auto; padding: 20px 16px 64px; }

/* ---- Hero ---- */
.jcp-hero {
	margin-bottom: 20px; padding: 24px 20px;
	background: var(--jcp-card); border: 1px solid var(--jcp-line); border-radius: var(--jcp-radius); box-shadow: var(--jcp-shadow);
}
.jcp-category {
	display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px;
	background: var(--jcp-brand-tint); color: var(--jcp-brand);
	font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.jcp-title { margin: 0 0 12px; font-size: clamp(1.625rem, 5vw, 2.5rem); line-height: 1.18; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.jcp-meta { margin: 0 0 16px; color: var(--jcp-muted); font-size: 0.9375rem; }
.jcp-creator { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding-top: 16px; border-top: 1px solid var(--jcp-line); }
.jcp-creator-btn { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; width: 100%; margin: 0; padding: 6px 8px 6px 0; background: none; border: 0; border-radius: 12px; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.jcp-creator-btn:hover .jcp-creator-hint { text-decoration: underline; }
.jcp-creator-btn:focus-visible { outline: 3px solid #f5a300; outline-offset: 2px; }
.jcp-creator-hint { margin-left: auto; color: var(--jcp-brand); font-size: 0.875rem; font-weight: 700; }
.jcp-creator-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--jcp-soft); }
.jcp-creator-initial { display: inline-flex; align-items: center; justify-content: center; background: var(--jcp-brand-tint); color: var(--jcp-brand); font-weight: 700; font-size: 1.125rem; }
.jcp-creator-text { line-height: 1.4; }
.jcp-verified { display: inline-flex; vertical-align: middle; margin-left: 6px; line-height: 0; }
.jcp-verified-icon { display: block; width: 20px; height: 20px; }
.jcp-jump { margin: 0; }
.jcp-jump .jcp-btn { width: 100%; }

/* ---- Creator profile popup ---- */
.jcp-profile { width: calc(100% - 24px); max-width: 480px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: var(--jcp-radius); background: var(--jcp-card); color: var(--jcp-ink); box-shadow: 0 20px 60px rgba(16, 24, 40, 0.35); overflow: auto; }
.jcp-profile::backdrop { background: rgba(15, 17, 21, 0.55); }
.jcp-profile-inner { position: relative; padding: 28px 20px 20px; line-height: 1.5; }
.jcp-profile-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--jcp-soft); color: var(--jcp-ink); font-size: 1.75rem; line-height: 1; cursor: pointer; }
.jcp-profile-close:hover { background: var(--jcp-line); }
.jcp-profile-close:focus-visible, .jcp-profile a:focus-visible { outline: 3px solid #f5a300; outline-offset: 2px; }
.jcp-profile-head { text-align: center; }
.jcp-profile-photo { display: block; width: 88px; height: 88px; margin: 0 auto 12px; border-radius: 50%; object-fit: cover; background: var(--jcp-soft); }
.jcp-profile-photo.jcp-creator-initial { display: flex; font-size: 2rem; }
.jcp-profile-name { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 4px; font-size: 1.375rem; line-height: 1.25; overflow-wrap: anywhere; }
.jcp-profile-name .jcp-signer-badge { width: 22px; height: 22px; }
.jcp-profile-meta { margin: 0 0 16px; color: var(--jcp-muted); font-size: 0.9375rem; }
.jcp-profile-bio { margin: 0 0 16px; text-align: left; overflow-wrap: anywhere; }
.jcp-profile-bio p { margin: 0 0 10px; }
.jcp-profile-bio p:last-child { margin-bottom: 0; }
.jcp-profile-links { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jcp-profile-links li { margin: 0; }
.jcp-profile-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1px solid var(--jcp-line); border-radius: 999px; background: var(--jcp-soft); color: var(--jcp-brand); font-weight: 700; font-size: 0.9375rem; text-decoration: none; }
.jcp-profile-links a:hover { background: var(--jcp-brand-tint); }
.jcp-profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 18px; }
.jcp-profile-stats > div { padding: 12px; border: 1px solid var(--jcp-line); border-radius: 12px; background: var(--jcp-soft); text-align: center; }
.jcp-profile-stats dt { margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--jcp-muted); }
.jcp-profile-stats dd { margin: 2px 0 0; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.jcp-profile-sub { margin: 0 0 8px; font-size: 1rem; }
.jcp-profile-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.jcp-profile-list li { margin: 0; }
.jcp-profile-list a { display: block; padding: 12px 14px; border: 1px solid var(--jcp-line); border-radius: 12px; color: inherit; text-decoration: none; }
.jcp-profile-list a:hover { background: var(--jcp-soft); }
.jcp-profile-item-title { display: block; font-weight: 700; overflow-wrap: anywhere; }
.jcp-profile-item-meta { display: block; margin-top: 2px; font-size: 0.875rem; color: var(--jcp-muted); }

/* ---- Recently signed strip ---- */
.jcp-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.jcp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jcp-signers { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--jcp-line); }
.jcp-signers-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.jcp-signers-title { margin: 0; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--jcp-muted); }
.jcp-signers-viewport {
	overflow: hidden; border-radius: 999px;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
}
.jcp-signers-viewport:focus-visible { outline: 3px solid #f5a300; outline-offset: 2px; }
.jcp-signers-track { display: flex; width: max-content; }
.jcp-signers-list { display: flex; flex: none; gap: 10px; margin: 0; padding: 4px 10px 4px 0; list-style: none; }
.jcp-signer {
	display: inline-flex; align-items: center; gap: 8px; flex: none; margin: 0;
	padding: 4px 14px 4px 4px; border: 1px solid var(--jcp-line); border-radius: 999px; background: var(--jcp-soft);
	font-size: 0.9375rem; line-height: 1.2; white-space: nowrap;
}
.jcp-signer-photo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: #fff; }
.jcp-signer-initial { display: inline-flex; align-items: center; justify-content: center; background: var(--jcp-brand-tint); color: var(--jcp-brand); font-weight: 700; font-size: 0.875rem; }
.jcp-signer-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.jcp-signer-badge { display: block; width: 16px; height: 16px; flex: none; }
.jcp-signers.is-animated .jcp-signers-track { animation: jcp-marquee var(--jcp-dur, 30s) linear infinite; }
.jcp-signers.is-animated:hover .jcp-signers-track,
.jcp-signers.is-animated:focus-within .jcp-signers-track { animation-play-state: paused; }
@keyframes jcp-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- Layout ---- */
.jcp-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.jcp-content { display: grid; gap: 16px; align-content: start; }
.jcp-section {
	margin: 0; padding: 20px; background: var(--jcp-card);
	border: 1px solid var(--jcp-line); border-radius: var(--jcp-radius); box-shadow: var(--jcp-shadow);
}
.jcp-section h2 { margin: 0 0 10px; font-size: 1.1875rem; line-height: 1.3; }
.jcp-section p { margin: 0 0 12px; overflow-wrap: anywhere; }
.jcp-section p:last-child { margin-bottom: 0; }
.jcp-section-demand { border-left: 5px solid var(--jcp-brand); background: linear-gradient(180deg, var(--jcp-brand-tint), #fff 140px); }

/* ---- Rich text from the app (headings, lists, links) ---- */
.jcp-rich { overflow-wrap: anywhere; }
.jcp-rich > :first-child { margin-top: 0; }
.jcp-rich > :last-child { margin-bottom: 0; }
.jcp-rich p { margin: 0 0 12px; }
.jcp-rich h3, .jcp-rich h4 { margin: 20px 0 8px; line-height: 1.3; font-weight: 700; }
.jcp-rich h3 { font-size: 1.1875rem; }
.jcp-rich h4 { font-size: 1.0625rem; }
.jcp-rich ul, .jcp-rich ol { margin: 0 0 14px; padding-left: 1.5em; }
.jcp-rich ul { list-style: disc outside; }
.jcp-rich ol { list-style: decimal outside; }
.jcp-rich li { display: list-item; margin: 0 0 6px; padding-left: 2px; }
.jcp-rich li > p { margin-bottom: 6px; }
.jcp-rich blockquote { margin: 0 0 14px; padding: 4px 0 4px 14px; border-left: 4px solid var(--jcp-line); color: var(--jcp-muted); }
.jcp-rich a { color: var(--jcp-brand); text-decoration: underline; }
.jcp-rich pre { overflow-x: auto; padding: 12px; background: var(--jcp-soft); border-radius: 8px; }
.jcp-rich hr { border: 0; border-top: 1px solid var(--jcp-line); margin: 16px 0; }

/* ---- Cards (sign, share, app) ---- */
.jcp-card {
	margin: 0 0 16px; padding: 20px; background: var(--jcp-card);
	border: 1px solid var(--jcp-line); border-radius: var(--jcp-radius); box-shadow: var(--jcp-shadow);
}
.jcp-card h2 { margin: 0 0 12px; font-size: 1.0625rem; line-height: 1.3; }
.jcp-sign { border-top: 5px solid var(--jcp-brand); }
.jcp-count { margin: 0 0 16px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; color: var(--jcp-muted); }
.jcp-count strong { font-size: 2.5rem; line-height: 1; color: var(--jcp-ink); font-variant-numeric: tabular-nums; }

/* ---- Buttons ---- */
.jcp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 10px 18px; border-radius: 12px;
	border: 1px solid var(--jcp-line); background: #fff; color: var(--jcp-ink);
	font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.jcp-btn:hover { background: var(--jcp-soft); border-color: #c8cfd8; }
.jcp-btn[hidden] { display: none; }
.jcp-btn:focus-visible, .jcp-link-btn:focus-visible, .jcp-page a:focus-visible {
	outline: 3px solid #f5a300; outline-offset: 2px;
}
.jcp-btn-primary { background: var(--jcp-brand); border-color: var(--jcp-brand); color: var(--jcp-brand-ink); width: 100%; box-shadow: 0 2px 8px rgba(26, 79, 214, 0.25); }
.jcp-btn-primary:hover { background: var(--jcp-brand-dark); border-color: var(--jcp-brand-dark); }
.jcp-btn[disabled], .jcp-btn[aria-disabled="true"] { opacity: 0.7; cursor: not-allowed; }
.jcp-btn-primary[disabled] { background: var(--jcp-ok); border-color: var(--jcp-ok); opacity: 1; box-shadow: none; }
.jcp-btn-primary[aria-busy="true"] { opacity: 0.75; }
.jcp-btn-play { width: 100%; background: #0f1115; border-color: #0f1115; color: #fff; }
.jcp-btn-play:hover { background: #262a33; border-color: #262a33; }

.jcp-share { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jcp-share .jcp-btn { width: 100%; padding-left: 8px; padding-right: 8px; }

/* ---- Messages ---- */
.jcp-hint { margin: 10px 0 0; font-size: 0.875rem; color: var(--jcp-muted); }
.jcp-status { margin: 12px 0 0; min-height: 1.4em; font-size: 0.9375rem; }
.jcp-status.is-ok, .jcp-status.is-error { padding: 10px 12px; border-radius: 10px; font-weight: 600; }
.jcp-status.is-ok { color: var(--jcp-ok); background: #e7f6ee; }
.jcp-status.is-error { color: var(--jcp-err); background: #fdecec; }

/* ---- Account row (sign out) ---- */
.jcp-account { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 14px 0 0; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--jcp-soft); font-size: 0.9375rem; color: var(--jcp-muted); overflow-wrap: anywhere; }
.jcp-account[hidden] { display: none; }
.jcp-link-btn { background: none; border: 0; padding: 8px 6px; min-height: 44px; color: var(--jcp-brand); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.jcp-link-btn[disabled] { opacity: 0.65; cursor: not-allowed; }

/* ---- Role picker ---- */

/* ---- Evidence ---- */
.jcp-evidence { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.jcp-evidence li { margin: 0; }
.jcp-evidence img { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--jcp-line); }
.jcp-evidence a { overflow-wrap: anywhere; }

/* ---- Wider screens ---- */
@media (min-width: 640px) {
	.jcp-hero { padding: 32px 32px 28px; }
	.jcp-section, .jcp-card { padding: 24px; }
	.jcp-jump .jcp-btn { width: auto; min-width: 240px; }
}
@media (min-width: 900px) {
	.jcp-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
	.jcp-aside { position: sticky; top: 24px; }
	.jcp-jump { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.jcp-page * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
	.jcp-signers-viewport { overflow-x: auto; border-radius: 12px; -webkit-mask-image: none; mask-image: none; }
	.jcp-signers-list[aria-hidden="true"] { display: none; }
}

/* ======================================================================
   Public profile and Drop pages (read-only previews)
   ====================================================================== */
.jcp-narrow { max-width: 680px; }
.jcp-avatar { display: block; flex: none; border-radius: 50%; object-fit: cover; background: var(--jcp-soft); }
.jcp-avatar-initial { display: inline-flex; align-items: center; justify-content: center; background: var(--jcp-brand-tint); color: var(--jcp-brand); font-weight: 700; }

/* Author chip */
.jcp-author { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
a.jcp-author:hover .jcp-author-name { text-decoration: underline; }
.jcp-author-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.jcp-author-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; overflow-wrap: anywhere; }
.jcp-author-handle { color: var(--jcp-muted); font-size: 0.9375rem; }

/* Profile hero */
.jcp-profile-hero-top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.jcp-profile-hero-id { min-width: 0; }
.jcp-profile-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 2px; font-size: clamp(1.5rem, 5vw, 2.125rem); }
.jcp-profile-handle { margin: 0 0 4px; color: var(--jcp-muted); font-size: 1.0625rem; }
.jcp-profile-hero .jcp-meta { margin: 0; }
.jcp-profile-hero-bio { margin: 0 0 14px; }
.jcp-profile-stats-3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; }
.jcp-follow-btn { width: 100%; }
.jcp-pager { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.jcp-pager .jcp-btn { flex: 1 1 160px; }

/* Drops */
.jcp-drop-list { display: grid; gap: 12px; }
.jcp-drop-card { padding: 16px; border: 1px solid var(--jcp-line); border-radius: 14px; background: #fff; }
.jcp-drop-text { margin: 0 0 10px; overflow-wrap: anywhere; font-size: 1.0625rem; line-height: 1.55; font-weight: 400; }
.jcp-drop-text a { color: var(--jcp-brand); text-decoration: underline; }
.jcp-drop-text-lg { font-size: 1.375rem; line-height: 1.45; letter-spacing: -0.005em; }
.jcp-drop-meta { margin: 6px 0 8px; color: var(--jcp-muted); font-size: 0.875rem; }
.jcp-drop-meta a { color: inherit; }
.jcp-cover { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; margin: 0 0 10px; padding: 0; overflow: hidden; border: 1px solid var(--jcp-line); border-radius: 12px; background: #0f1115; }
.jcp-cover-btn { cursor: zoom-in; font: inherit; color: inherit; -webkit-appearance: none; appearance: none; }
.jcp-cover-btn:focus-visible { outline: 3px solid #f5a300; outline-offset: 2px; }
.jcp-cover-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(22px) brightness(0.85); transform: scale(1.15); }
.jcp-cover-img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
@supports not (aspect-ratio: 16 / 9) {
	.jcp-cover { height: 0; padding-top: 56.25%; }
	.jcp-cover-bg, .jcp-cover-img { position: absolute; top: 0; left: 0; }
}
.jcp-counts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; color: var(--jcp-muted); font-size: 0.9375rem; }
.jcp-counts li { margin: 0; }
.jcp-counts strong { color: var(--jcp-ink); font-variant-numeric: tabular-nums; }

/* Single Drop page */
.jcp-drop-full { margin: 0 0 16px; padding: 22px 20px; background: var(--jcp-card); border: 1px solid var(--jcp-line); border-radius: var(--jcp-radius); box-shadow: var(--jcp-shadow); }
.jcp-drop-head { margin-bottom: 14px; }
.jcp-drop-full h1.jcp-drop-text { margin: 0 0 12px; }
.jcp-drop-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--jcp-line); }
.jcp-drop-actions .jcp-btn { width: 100%; }
.jcp-embed { display: block; margin-top: 14px; padding: 14px; border: 1px solid var(--jcp-line); border-radius: 14px; background: var(--jcp-soft); color: inherit; text-decoration: none; }
a.jcp-embed:hover { background: var(--jcp-brand-tint); }
.jcp-embed-kicker { display: block; margin-bottom: 4px; color: var(--jcp-muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.jcp-embed-title { display: block; font-size: 1.0625rem; overflow-wrap: anywhere; }
.jcp-embed-meta { display: block; margin-top: 2px; color: var(--jcp-muted); font-size: 0.875rem; }
.jcp-embed-quote .jcp-drop-text { margin-top: 10px; font-size: 1rem; }

/* App-download popup (reuses the profile dialog look) */
.jcp-app-popup-inner { padding-top: 36px; text-align: center; }
.jcp-app-popup-title { margin: 0 0 8px; font-size: 1.375rem; line-height: 1.25; }
.jcp-app-popup-inner p { margin: 0 0 18px; color: var(--jcp-muted); }
.jcp-app-popup-actions { display: grid; gap: 10px; }

@media (min-width: 640px) {
	.jcp-follow-btn { width: auto; min-width: 200px; }
	.jcp-drop-full { padding: 28px; }
	.jcp-drop-actions { grid-template-columns: repeat(4, auto); justify-content: start; }
}

.jcp-structured h2, .jcp-structured h3 { margin: 0 0 0.5rem; }
.jcp-structured h3 { font-size: 1rem; }
.jcp-structured dl, .jcp-structured ul { margin: 0.5rem 0 1rem; }
.jcp-structured dt { font-weight: 600; }
.jcp-structured dd { margin: 0 0 0.5rem; }
.jcp-structured blockquote { margin: 0 0 1rem; padding-inline-start: 0.75rem; border-inline-start: 3px solid var(--jcp-line); }
.jcp-structured-pill { display: inline-block; margin: 0 0 0.75rem; padding: 0.25rem 0.75rem; border: 1px solid var(--jcp-line); border-radius: 999px; font-weight: 600; }
.jcp-evidence-image { display: block; max-width: 100%; height: auto; border-radius: 8px; }
