/* ============================================================
   QOJO MEMBERS — auth modal, account menu, save button,
   onboarding and dashboard. Uses the theme design tokens.
   ============================================================ */

.qojo-auth[hidden] { display: none !important; }
.qojo-field[hidden],
.qojo-auth__step[hidden],
.qojo-auth__error[hidden] { display: none !important; }

/* ---------- Buttons the theme defines per-page, mirrored here ---------- */
.qojo-btn--outline-dark {
	background: transparent;
	color: var(--qojo-secondary, #08092B);
	border: 2px solid var(--qojo-secondary, #08092B);
}
.qojo-btn--outline-dark:hover {
	background: var(--qojo-secondary, #08092B);
	color: #fff;
}

/* ---------- Form fields (modal, onboarding, dashboard) ---------- */
.qojo-field {
	display: block;
	margin: 0 0 18px;
}
.qojo-field > span {
	display: block;
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--qojo-grey-700, #3c4157);
	margin: 0 0 8px;
}
.qojo-field input[type="text"],
.qojo-field input[type="email"],
.qojo-field select {
	width: 100%;
	box-sizing: border-box;
	font-family: var(--qojo-font-body, 'Inter', sans-serif);
	font-size: 16px;
	color: var(--qojo-secondary, #08092B);
	background: #fff;
	border: 1.5px solid var(--qojo-grey-300, #c9cede);
	border-radius: 10px;
	padding: 13px 16px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.qojo-field input:focus,
.qojo-field select:focus {
	border-color: var(--qojo-primary, #1A25FF);
	box-shadow: 0 0 0 3px rgba(26, 37, 255, 0.12);
}
.qojo-field input[disabled] {
	background: var(--qojo-grey-100, #eef0f6);
	color: var(--qojo-grey-500, #8a90a8);
}

/* ---------- Header account control ---------- */
.qojo-account { position: relative; }
.qojo-account__btn {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: none;
	padding: 0;
	overflow: hidden;
	cursor: pointer;
	background: var(--qojo-primary, #1A25FF);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.qojo-account__btn img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.qojo-account__initial {
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 17px;
	font-weight: 700;
	line-height: 1;
}
.qojo-account__menu {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: 220px;
	background: #fff;
	border: 1px solid var(--qojo-grey-100, #eef0f6);
	border-radius: 14px;
	box-shadow: 0 18px 48px rgba(8, 9, 43, 0.16);
	padding: 10px;
	z-index: 500;
}
.qojo-account__menu[hidden] { display: none !important; }
.qojo-account__name {
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-weight: 600;
	font-size: 15px;
	color: var(--qojo-secondary, #08092B);
	margin: 6px 10px 10px;
	padding: 0 0 10px;
	border-bottom: 1px solid var(--qojo-grey-100, #eef0f6);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.qojo-account__menu a {
	display: block;
	padding: 10px;
	border-radius: 8px;
	font-size: 15px;
	color: var(--qojo-secondary, #08092B);
	text-decoration: none;
}
.qojo-account__menu a:hover { background: var(--qojo-off-white, #f6f7fb); color: var(--qojo-primary, #1A25FF); }

/* ---------- Save button on articles ---------- */
.qojo-save-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 13.5px;
	font-weight: 600;
	color: var(--qojo-secondary, #08092B);
	background: #fff;
	border: 1.5px solid var(--qojo-grey-300, #c9cede);
	border-radius: 999px;
	padding: 8px 16px;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.qojo-save-btn svg { flex-shrink: 0; }
.qojo-save-btn:hover { border-color: var(--qojo-primary, #1A25FF); color: var(--qojo-primary, #1A25FF); }
.qojo-save-btn.is-saved {
	background: var(--qojo-primary, #1A25FF);
	border-color: var(--qojo-primary, #1A25FF);
	color: #fff;
}
.qojo-save-btn.is-saved svg path { fill: currentColor; }
.qojo-save-btn[disabled] { opacity: 0.6; cursor: wait; }
.qojo-single__share .qojo-save-btn { margin-right: 12px; }

/* ---------- Auth modal ---------- */
.qojo-auth {
	position: fixed;
	inset: 0;
	z-index: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.qojo-auth__scrim {
	position: absolute;
	inset: 0;
	background: rgba(8, 9, 43, 0.55);
	opacity: 0;
	transition: opacity 0.25s ease;
}
body.qojo-auth-open .qojo-auth__scrim { opacity: 1; }
.qojo-auth__card {
	position: relative;
	width: 100%;
	max-width: 430px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: #fff;
	border-radius: 20px;
	padding: 36px 36px 30px;
	box-shadow: 0 32px 80px rgba(8, 9, 43, 0.3);
	opacity: 0;
	transform: translateY(14px) scale(0.985);
	transition: opacity 0.25s ease, transform 0.25s ease;
}
body.qojo-auth-open .qojo-auth__card { opacity: 1; transform: none; }
.qojo-auth__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 38px;
	height: 38px;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: var(--qojo-secondary, #08092B);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.qojo-auth__close:hover { background: var(--qojo-grey-100, #eef0f6); }
.qojo-auth__brand {
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 26px;
	font-weight: 700;
	letter-spacing: -0.03em;
	color: var(--qojo-secondary, #08092B);
	margin: 0 0 22px;
}
.qojo-auth__brand span { color: var(--qojo-primary, #1A25FF); }
.qojo-auth__tabs {
	display: flex;
	background: var(--qojo-grey-100, #eef0f6);
	border-radius: 999px;
	padding: 4px;
	margin: 0 0 24px;
}
.qojo-auth__tab {
	flex: 1;
	border: none;
	background: transparent;
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 15px;
	font-weight: 600;
	color: var(--qojo-grey-700, #3c4157);
	padding: 10px 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.qojo-auth__tab.is-active {
	background: #fff;
	color: var(--qojo-secondary, #08092B);
	box-shadow: 0 2px 8px rgba(8, 9, 43, 0.1);
}
.qojo-auth__title {
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--qojo-secondary, #08092B);
	margin: 0 0 8px;
}
.qojo-auth__sub {
	font-size: 15px;
	line-height: 1.55;
	color: var(--qojo-grey-700, #3c4157);
	margin: 0 0 22px;
}
.qojo-auth__error {
	background: #fdf0f0;
	border: 1px solid #f3c2c2;
	color: #9c2b2b;
	font-size: 14px;
	line-height: 1.5;
	border-radius: 10px;
	padding: 11px 14px;
	margin: 0 0 16px;
}
.qojo-auth__submit { width: 100%; }
.qojo-auth__submit[disabled] { opacity: 0.65; cursor: wait; }
.qojo-auth__fineprint {
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--qojo-grey-500, #8a90a8);
	text-align: center;
	margin: 18px 0 0;
}
.qojo-auth__fineprint a { color: var(--qojo-primary, #1A25FF); }
.qojo-auth__code {
	text-align: center;
	font-size: 26px !important;
	font-weight: 700;
	letter-spacing: 10px;
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif) !important;
}
.qojo-auth__resend {
	font-size: 14px;
	color: var(--qojo-grey-700, #3c4157);
	text-align: center;
	margin: 18px 0 0;
}
.qojo-auth__resend button,
.qojo-auth__backline button {
	border: none;
	background: none;
	padding: 0;
	font: inherit;
	font-weight: 600;
	color: var(--qojo-primary, #1A25FF);
	cursor: pointer;
}
.qojo-auth__resend button[disabled] { color: var(--qojo-grey-500, #8a90a8); cursor: default; }
.qojo-auth__backline { text-align: center; margin: 8px 0 0; font-size: 14px; }

/* ---------- Member pages (onboarding + dashboard) ---------- */
.qojo-m-page {
	background: var(--qojo-off-white, #f6f7fb);
	padding: 56px 0 84px;
}
.qojo-m-wrap {
	width: 100%;
	max-width: 1250px;
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}
.qojo-m-wrap--narrow { max-width: 720px; }
.qojo-m-title {
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 38px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--qojo-secondary, #08092B);
	margin: 6px 0 10px;
}
.qojo-m-sub {
	font-size: 16.5px;
	line-height: 1.65;
	color: var(--qojo-grey-700, #3c4157);
	margin: 0 0 30px;
	max-width: 620px;
}
.qojo-m-card,
.qojo-m-panel {
	background: #fff;
	border: 1px solid var(--qojo-grey-100, #eef0f6);
	border-radius: 18px;
	padding: 34px;
}
.qojo-m-alert {
	background: #fdf0f0;
	border: 1px solid #f3c2c2;
	color: #9c2b2b;
	font-size: 14.5px;
	border-radius: 10px;
	padding: 12px 16px;
	margin: 0 0 20px;
}
.qojo-m-success {
	background: #ecf7ee;
	border: 1px solid #bfe3c6;
	color: #1d6b31;
	font-size: 14.5px;
	border-radius: 10px;
	padding: 12px 16px;
	margin: 0 0 20px;
}
.qojo-m-hint {
	font-size: 13px;
	line-height: 1.55;
	color: var(--qojo-grey-500, #8a90a8);
	margin: 8px 0 0;
}
.qojo-m-submit { margin-top: 8px; }
.qojo-m-skip { text-align: center; margin: 16px 0 0; font-size: 14.5px; }
.qojo-m-skip a { color: var(--qojo-grey-700, #3c4157); }

.qojo-m-avatar-row {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: 0 0 26px;
}
.qojo-m-avatar-preview {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--qojo-primary, #1A25FF);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.qojo-m-avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qojo-m-avatar-preview span {
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 36px;
	font-weight: 700;
}
.qojo-m-avatar-preview--sm { width: 56px; height: 56px; }
.qojo-m-avatar-preview--sm span { font-size: 22px; }
.qojo-m-upload { cursor: pointer; display: inline-block; }
.qojo-m-upload__btn { pointer-events: none; padding: 11px 22px; font-size: 14px; }

/* Interest chips */
.qojo-m-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.qojo-m-chip input { position: absolute; opacity: 0; pointer-events: none; }
.qojo-m-chip { position: relative; cursor: pointer; }
.qojo-m-chip span {
	display: inline-block;
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 14px;
	font-weight: 600;
	color: var(--qojo-grey-700, #3c4157);
	border: 1.5px solid var(--qojo-grey-300, #c9cede);
	border-radius: 999px;
	padding: 9px 18px;
	transition: all 0.18s ease;
}
.qojo-m-chip:hover span { border-color: var(--qojo-primary, #1A25FF); color: var(--qojo-primary, #1A25FF); }
.qojo-m-chip input:checked + span {
	background: var(--qojo-primary, #1A25FF);
	border-color: var(--qojo-primary, #1A25FF);
	color: #fff;
}
.qojo-m-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(26, 37, 255, 0.25); }

/* Dashboard layout */
.qojo-m-layout {
	display: grid;
	grid-template-columns: 290px 1fr;
	gap: 26px;
	align-items: start;
	margin-top: 26px;
}
.qojo-m-nav {
	background: #fff;
	border: 1px solid var(--qojo-grey-100, #eef0f6);
	border-radius: 18px;
	padding: 24px;
}
.qojo-m-nav__who {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 0 20px;
	margin: 0 0 14px;
	border-bottom: 1px solid var(--qojo-grey-100, #eef0f6);
}
.qojo-m-nav__name {
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-weight: 600;
	font-size: 16.5px;
	color: var(--qojo-secondary, #08092B);
	margin: 0;
	line-height: 1.3;
}
.qojo-m-nav__email { font-size: 13px; color: var(--qojo-grey-500, #8a90a8); margin: 2px 0 0; word-break: break-all; }
.qojo-m-nav nav a {
	display: block;
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 15.5px;
	font-weight: 600;
	color: var(--qojo-grey-700, #3c4157);
	text-decoration: none;
	padding: 12px 14px;
	border-radius: 10px;
	margin: 0 0 4px;
}
.qojo-m-nav nav a:hover { background: var(--qojo-off-white, #f6f7fb); color: var(--qojo-secondary, #08092B); }
.qojo-m-nav nav a.is-active { background: var(--qojo-primary-light, #e8eaff); color: var(--qojo-primary, #1A25FF); }
.qojo-m-nav nav a.qojo-m-nav__logout { color: #9c2b2b; margin-top: 10px; border-top: 1px solid var(--qojo-grey-100, #eef0f6); border-radius: 0 0 10px 10px; }
.qojo-m-panel h2 {
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 24px;
	font-weight: 700;
	color: var(--qojo-secondary, #08092B);
	margin: 0 0 24px;
}
.qojo-m-danger {
	margin-top: 40px;
	border-top: 1px solid var(--qojo-grey-100, #eef0f6);
	padding-top: 28px;
}
.qojo-m-danger h3 {
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 17px;
	color: var(--qojo-secondary, #08092B);
	margin: 0 0 8px;
}
.qojo-m-danger p { font-size: 14.5px; color: var(--qojo-grey-700, #3c4157); margin: 0 0 14px; line-height: 1.6; }
.qojo-m-danger__btn {
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 14px;
	font-weight: 600;
	color: #9c2b2b;
	background: #fff;
	border: 1.5px solid #e5b4b4;
	border-radius: 999px;
	padding: 10px 20px;
	cursor: pointer;
}
.qojo-m-danger__btn:hover { background: #fdf0f0; }

/* Saved articles */
.qojo-m-empty {
	text-align: center;
	padding: 36px 20px;
}
.qojo-m-empty p { font-size: 16px; color: var(--qojo-grey-700, #3c4157); line-height: 1.6; margin: 0 0 10px; }
.qojo-m-empty .qojo-btn { margin-top: 14px; text-decoration: none; }
.qojo-m-saved-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 26px;
}
.qojo-m-card-story__img { display: block; border-radius: 12px; overflow: hidden; margin: 0 0 14px; }
.qojo-m-card-story__img img { width: 100%; height: auto; display: block; }
.qojo-m-card-story h3 {
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 19px;
	font-weight: 600;
	line-height: 1.35;
	margin: 6px 0 8px;
	color: var(--qojo-secondary, #08092B);
}
.qojo-m-card-story h3 a { color: inherit; text-decoration: none; }
.qojo-m-card-story h3 a:hover { color: var(--qojo-primary, #1A25FF); }
.qojo-m-card-story__meta { font-size: 13.5px; color: var(--qojo-grey-500, #8a90a8); margin: 0 0 12px; }
.qojo-m-remove {
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 13.5px;
	font-weight: 600;
	color: #9c2b2b;
	background: none;
	border: 1.5px solid #e5b4b4;
	border-radius: 999px;
	padding: 7px 15px;
	cursor: pointer;
}
.qojo-m-remove:hover { background: #fdf0f0; }

/* Subscription tab */
.qojo-m-plan-status { font-size: 15.5px; line-height: 1.65; color: var(--qojo-grey-700, #3c4157); margin: 0 0 24px; }
.qojo-m-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.qojo-m-plan {
	border: 1.5px solid var(--qojo-grey-100, #eef0f6);
	border-radius: 16px;
	padding: 26px;
}
.qojo-m-plan--team { background: var(--qojo-off-white, #f6f7fb); }
.qojo-m-plan__price {
	font-family: var(--qojo-font-heading, 'Space Grotesk', sans-serif);
	font-size: 32px;
	font-weight: 700;
	color: var(--qojo-secondary, #08092B);
	margin: 8px 0 16px;
}
.qojo-m-plan__price span { font-size: 15px; font-weight: 500; color: var(--qojo-grey-500, #8a90a8); }
.qojo-m-plan ul { list-style: none; margin: 0 0 22px; padding: 0; }
.qojo-m-plan li {
	font-size: 14.5px;
	color: var(--qojo-grey-700, #3c4157);
	padding: 7px 0 7px 24px;
	position: relative;
	line-height: 1.5;
}
.qojo-m-plan li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 13px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--qojo-primary, #1A25FF);
}
.qojo-m-plan .qojo-btn { text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.qojo-m-layout { grid-template-columns: 1fr; }
	.qojo-m-nav nav { display: flex; flex-wrap: wrap; gap: 6px; }
	.qojo-m-nav nav a { margin: 0; }
	.qojo-m-nav nav a.qojo-m-nav__logout { border-top: none; border-radius: 10px; margin-top: 0; }
	.qojo-m-plans { grid-template-columns: 1fr; }
	.qojo-m-saved-grid { grid-template-columns: 1fr; }
	.qojo-m-card, .qojo-m-panel { padding: 26px 22px; }
	.qojo-m-title { font-size: 30px; }
	.qojo-auth__card { padding: 30px 24px 26px; }
}
