/**
 * Author Portal — Ultimate Immaculate polish (v1.3.32)
 * Scoped to .author-portal--v2 / .author-portal--immaculate
 * Loads after polish.css so it wins cleanly.
 */

/* ---------- Design tokens ---------- */
.author-portal--v2.author-portal--immaculate,
.author-portal--immaculate {
	--api-navy: #0a2540;
	--api-navy-soft: #123a5c;
	--api-blue: #5c7db7;
	--api-blue-soft: rgba(92, 125, 183, 0.12);
	--api-mint: #10b981;
	--api-mint-soft: rgba(16, 185, 129, 0.1);
	--api-ink: #0f172a;
	--api-ink-soft: #334155;
	--api-muted: #64748b;
	--api-line: #e2e8f0;
	--api-line-soft: #eef2f6;
	--api-surface: #ffffff;
	--api-surface-2: #f8fafc;
	--api-surface-3: #f1f5f9;
	--api-radius: 16px;
	--api-radius-sm: 12px;
	--api-radius-xs: 8px;
	--api-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
	--api-shadow-lg: 0 4px 6px rgba(15, 23, 42, 0.03), 0 16px 40px rgba(15, 23, 42, 0.08);
	--api-focus: 0 0 0 3px rgba(92, 125, 183, 0.28);
	--api-ease: cubic-bezier(0.22, 1, 0.36, 1);
	font-feature-settings: "kern" 1, "liga" 1;
	-webkit-font-smoothing: antialiased;
}

.author-portal--immaculate.site-main,
.author-portal--immaculate {
	background:
		radial-gradient(1200px 480px at 10% -10%, rgba(92, 125, 183, 0.09), transparent 55%),
		radial-gradient(900px 420px at 100% 0%, rgba(16, 185, 129, 0.06), transparent 50%),
		linear-gradient(180deg, #eef2f7 0%, #f4f6f9 40%, #f8fafc 100%);
	color: var(--api-ink);
}

.author-portal--immaculate ::selection {
	background: rgba(92, 125, 183, 0.22);
	color: var(--api-navy);
}

/* ---------- Layout shell ---------- */
.author-portal--immaculate .dashboard-container {
	gap: 28px;
	padding: 28px 24px 48px;
	align-items: start;
}

.author-portal--immaculate .dashboard-main > .dashboard-tab {
	background: var(--api-surface);
	border: 1px solid var(--api-line);
	border-radius: var(--api-radius);
	box-shadow: var(--api-shadow);
	overflow: hidden;
}

.author-portal--immaculate .dashboard-main > .dashboard-tab.active {
	animation: api-tab-in 0.35s var(--api-ease) both;
}

@keyframes api-tab-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* ---------- Sidebar ---------- */
.author-portal--immaculate .dashboard-sidebar.apv2-sidebar {
	background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
	border: 1px solid var(--api-line);
	border-radius: var(--api-radius);
	box-shadow: var(--api-shadow);
	padding: 0 0 12px;
	overflow: hidden;
}

.author-portal--immaculate .apv2-sidebar__profile {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 16px 16px;
	margin: 0 0 4px;
	background:
		linear-gradient(135deg, rgba(10, 37, 64, 0.96) 0%, rgba(18, 58, 92, 0.94) 55%, rgba(92, 125, 183, 0.85) 100%);
	color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.author-portal--immaculate .apv2-sidebar__avatar {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	background: rgba(255, 255, 255, 0.14);
	border: 1px solid rgba(255, 255, 255, 0.22);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
	flex-shrink: 0;
}

.author-portal--immaculate .apv2-sidebar__name {
	display: block;
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1.25;
	color: #fff;
}

.author-portal--immaculate .apv2-sidebar__role {
	display: block;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.72;
	margin-top: 2px;
	color: #fff;
}

.author-portal--immaculate .dashboard-nav {
	padding: 8px 10px 4px;
	gap: 2px;
}

.author-portal--immaculate .dashboard-nav .nav-item {
	position: relative;
	margin: 0;
	padding: 11px 12px 11px 14px;
	border-radius: 10px;
	color: var(--api-ink-soft);
	font-size: 0.88rem;
	font-weight: 600;
	gap: 10px;
	border: 1px solid transparent;
}

.author-portal--immaculate .dashboard-nav .nav-item:hover:not(.active) {
	background: var(--api-surface-2);
	color: var(--api-ink);
	border-color: var(--api-line-soft);
}

.author-portal--immaculate .dashboard-nav .nav-item.active {
	background: linear-gradient(90deg, rgba(92, 125, 183, 0.14) 0%, rgba(92, 125, 183, 0.06) 100%);
	color: var(--api-navy);
	border-color: rgba(92, 125, 183, 0.22);
	box-shadow: inset 3px 0 0 var(--api-blue);
	font-weight: 700;
}

.author-portal--immaculate .dashboard-nav .nav-item.active .nav-icon {
	color: var(--api-blue);
}

.author-portal--immaculate .dashboard-nav .nav-icon {
	width: 20px;
	height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	opacity: 0.9;
}

.author-portal--immaculate .dashboard-nav .nav-icon svg {
	width: 18px;
	height: 18px;
}

.author-portal--immaculate .dashboard-nav .nav-badge {
	margin-left: auto;
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	border-radius: 999px;
	background: linear-gradient(135deg, #ff3338 0%, #e10600 100%);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(225, 6, 0, 0.28);
}

.author-portal--immaculate .apv2-sidebar__support {
	margin: 12px 10px 0;
	padding: 12px 10px 4px;
	border-top: 1px solid var(--api-line-soft);
	display: grid;
	gap: 4px;
}

.author-portal--immaculate .apv2-sidebar__support .support-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 9px;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--api-ink-soft);
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.author-portal--immaculate .apv2-sidebar__support .support-link:hover {
	background: var(--api-surface-2);
	color: var(--api-navy);
}

/* ---------- Hero ---------- */
.author-portal--immaculate .apv2-hero {
	position: relative;
	padding: 28px 28px 24px;
	background:
		radial-gradient(ellipse 80% 80% at 100% 0%, rgba(92, 125, 183, 0.35), transparent 50%),
		radial-gradient(ellipse 60% 70% at 0% 100%, rgba(16, 185, 129, 0.12), transparent 45%),
		linear-gradient(135deg, #0a2540 0%, #123a5c 48%, #1a4a6e 100%);
	border-bottom: none;
	overflow: hidden;
}

.author-portal--immaculate .apv2-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
	background-size: 28px 28px;
	mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
	pointer-events: none;
	opacity: 0.5;
}

.author-portal--immaculate .apv2-hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px 28px;
}

.author-portal--immaculate .apv2-hero__eyebrow {
	margin: 0 0 8px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
}

.author-portal--immaculate .apv2-hero h1 {
	margin: 0 0 10px;
	font-size: clamp(1.55rem, 2.6vw, 2.05rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.12;
	color: #fff;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.author-portal--immaculate .apv2-hero__lede {
	color: rgba(255, 255, 255, 0.86);
	font-size: 0.95rem;
	line-height: 1.55;
	max-width: 48ch;
}

.author-portal--immaculate .apv2-hero__trust li {
	padding: 5px 10px 5px 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 0.8rem;
}

.author-portal--immaculate .apv2-hero__trust-icon {
	background: rgba(126, 232, 200, 0.2);
	color: #7ee8c8;
}

.author-portal--immaculate .apv2-hero__phase {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	padding: 8px 12px;
	border-radius: 999px;
	background: rgba(126, 232, 200, 0.12);
	border: 1px solid rgba(126, 232, 200, 0.28);
	color: rgba(255, 255, 255, 0.88);
	font-size: 0.84rem;
}

.author-portal--immaculate .apv2-hero__phase strong {
	color: #a7f3d0;
	font-weight: 700;
}

.author-portal--immaculate .apv2-hero__actions .btn {
	min-height: 44px;
	padding: 11px 18px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 0.9rem;
	transition: transform 0.15s var(--api-ease), box-shadow 0.15s ease, background 0.15s ease;
}

.author-portal--immaculate .apv2-hero__actions .btn-primary {
	box-shadow: 0 6px 20px rgba(255, 0, 5, 0.35);
}

.author-portal--immaculate .apv2-hero__actions .btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(255, 0, 5, 0.4);
}

.author-portal--immaculate .apv2-hero__actions .btn-secondary {
	background: #fff !important;
	color: var(--api-navy) !important;
	border: 2px solid #fff !important;
	-webkit-text-fill-color: var(--api-navy);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.author-portal--immaculate .apv2-hero__actions .btn-secondary:hover {
	background: #e8eef6 !important;
	color: var(--api-navy) !important;
	border-color: #e8eef6 !important;
	-webkit-text-fill-color: var(--api-navy);
}

/* ---------- Getting started banner ---------- */
.author-portal--immaculate .apv2-getting-started--global {
	margin: 0 0 18px;
	padding: 20px 22px;
	border-radius: var(--api-radius);
	border: 1px solid #6ee7b7;
	background:
		linear-gradient(135deg, #ecfdf5 0%, #f0fdf9 50%, #ffffff 100%);
	box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

.author-portal--immaculate .apv2-getting-started__eyebrow {
	margin: 0 0 4px;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #047857;
}

.author-portal--immaculate .apv2-getting-started__title {
	margin: 0 0 8px;
	font-size: 1.2rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--api-navy);
}

.author-portal--immaculate .apv2-getting-started__lede {
	margin: 0 0 14px;
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--api-ink-soft);
	max-width: 62ch;
}

.author-portal--immaculate .apv2-getting-started__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

/* ---------- Trust / phase bar ---------- */
.author-portal--immaculate .apv2-trust-bar {
	padding: 16px 22px;
	background: linear-gradient(180deg, #fbfcfe 0%, #f8fafc 100%);
	border-bottom: 1px solid var(--api-line-soft);
}

.author-portal--immaculate .apv2-trust-bar__item {
	padding: 9px 14px 9px 10px;
	border-radius: 999px;
	background: var(--api-surface);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.author-portal--immaculate .apv2-trust-bar__item--current {
	border-color: var(--api-blue);
	background: linear-gradient(180deg, #ffffff 0%, #f0f5fc 100%);
	box-shadow: 0 0 0 3px var(--api-blue-soft), 0 4px 12px rgba(92, 125, 183, 0.12);
	color: var(--api-navy);
}

.author-portal--immaculate .apv2-trust-bar__item--done {
	opacity: 1;
	border-color: #a7f3d0;
	background: #ecfdf5;
	color: #065f46;
}

.author-portal--immaculate .apv2-trust-bar__item--done .apv2-trust-bar__num {
	background: var(--api-mint);
}

/* ---------- Stats ---------- */
.author-portal--immaculate .apv2-stats {
	gap: 14px;
	padding: 22px 24px 4px;
}

.author-portal--immaculate .apv2-stat-card {
	position: relative;
	padding: 18px 18px 16px;
	border-radius: var(--api-radius-sm);
	background: var(--api-surface);
	border: 1px solid var(--api-line);
	box-shadow: var(--api-shadow);
	overflow: hidden;
}

.author-portal--immaculate .apv2-stat-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--api-blue), #7ee8c8);
	opacity: 0.85;
}

.author-portal--immaculate .apv2-stat-card:nth-child(2)::before {
	background: linear-gradient(90deg, #ff6b6b, #ff3338);
}

.author-portal--immaculate .apv2-stat-card:nth-child(3)::before {
	background: linear-gradient(90deg, #5c7db7, #0a2540);
}

.author-portal--immaculate .apv2-stat-card:nth-child(4)::before {
	background: linear-gradient(90deg, #10b981, #34d399);
}

.author-portal--immaculate .apv2-stat-card:hover {
	transform: translateY(-3px);
	border-color: rgba(92, 125, 183, 0.35);
	box-shadow: var(--api-shadow-lg);
}

.author-portal--immaculate .apv2-stat-card:focus-visible {
	outline: none;
	box-shadow: var(--api-focus), var(--api-shadow);
}

.author-portal--immaculate .apv2-stat-card__value {
	font-size: 1.7rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--api-navy);
	font-variant-numeric: tabular-nums;
}

.author-portal--immaculate .apv2-stat-card__label {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--api-muted);
}

/* ---------- Panels & sections ---------- */
.author-portal--immaculate .apv2-panel {
	margin: 20px 24px 0;
	padding: 22px 22px 20px;
	background: var(--api-surface);
	border: 1px solid var(--api-line);
	border-radius: var(--api-radius-sm);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.author-portal--immaculate .apv2-section-head__eyebrow {
	color: var(--api-blue);
	font-size: 0.7rem;
	letter-spacing: 0.1em;
}

.author-portal--immaculate .apv2-section-head__title {
	font-size: 1.18rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--api-navy);
}

.author-portal--immaculate .apv2-section-head__lede,
.author-portal--immaculate .portal-section-lead {
	color: var(--api-muted);
	font-size: 0.9rem;
	line-height: 1.55;
}

.author-portal--immaculate .apv2-welcome-note {
	margin: 14px 24px 0;
	padding: 12px 16px;
	border-radius: 10px;
	background: linear-gradient(90deg, rgba(92, 125, 183, 0.08), rgba(92, 125, 183, 0.03));
	border: 1px solid rgba(92, 125, 183, 0.15);
	border-left: 3px solid var(--api-blue);
	color: var(--api-ink-soft);
	font-size: 0.82rem;
}

/* ---------- Todo cards ---------- */
.author-portal--immaculate .todo-section {
	position: relative;
	padding: 16px 16px 14px 18px;
	border-radius: var(--api-radius-xs);
	border: 1px solid var(--api-line);
	background: var(--api-surface);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.author-portal--immaculate .todo-section:hover {
	border-color: rgba(92, 125, 183, 0.4);
	box-shadow: 0 6px 18px rgba(92, 125, 183, 0.08);
	transform: translateY(-1px);
}

.author-portal--immaculate .todo-section--urgent {
	border-color: #fcd34d;
	background: linear-gradient(180deg, #fffbeb 0%, #ffffff 70%);
	box-shadow: 0 4px 16px rgba(251, 191, 36, 0.1);
}

.author-portal--immaculate .todo-section__badge {
	display: inline-flex;
	align-items: center;
	margin-bottom: 8px;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #fcd34d;
}

.author-portal--immaculate .todo-section strong {
	font-size: 0.95rem;
	font-weight: 800;
	color: var(--api-navy);
}

.author-portal--immaculate .todo-section a {
	font-weight: 700;
	color: var(--api-blue);
	text-decoration: none;
}

.author-portal--immaculate .todo-section a:hover {
	color: var(--api-navy);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---------- Empty states ---------- */
.author-portal--immaculate .apv2-empty {
	padding: 48px 28px;
	border-radius: var(--api-radius);
	border: 1px dashed #cbd5e1;
	background:
		radial-gradient(circle at 50% 0%, rgba(92, 125, 183, 0.08), transparent 55%),
		var(--api-surface-2);
}

.author-portal--immaculate .apv2-empty::before {
	content: "";
	display: block;
	width: 52px;
	height: 52px;
	margin: 0 auto 16px;
	border-radius: 16px;
	background:
		linear-gradient(135deg, rgba(92, 125, 183, 0.15), rgba(16, 185, 129, 0.12));
	border: 1px solid var(--api-line);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.author-portal--immaculate .apv2-empty__title {
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--api-navy);
}

.author-portal--immaculate .apv2-empty__lede {
	font-size: 0.92rem;
	color: var(--api-muted);
}

/* ---------- Project / title cards ---------- */
.author-portal--immaculate .project-card,
.author-portal--immaculate .title-card {
	border: 1px solid var(--api-line);
	border-radius: var(--api-radius-sm);
	background: var(--api-surface);
	box-shadow: var(--api-shadow);
	transition: transform 0.18s var(--api-ease), box-shadow 0.18s ease, border-color 0.18s ease;
}

.author-portal--immaculate .project-card {
	padding: 18px 18px 16px;
	border-left: 3px solid var(--api-blue);
}

.author-portal--immaculate .project-card:hover,
.author-portal--immaculate .title-card:hover {
	transform: translateY(-2px);
	border-color: rgba(92, 125, 183, 0.35);
	box-shadow: var(--api-shadow-lg);
}

.author-portal--immaculate .project-card .project-header h3 {
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--api-navy);
}

.author-portal--immaculate .project-card .status-badge {
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 5px 10px;
	border-radius: 999px;
	background: var(--api-surface-2);
	border: 1px solid var(--api-line);
	color: var(--api-ink-soft);
}

.author-portal--immaculate .project-card .progress-bar {
	height: 7px;
	background: var(--api-surface-3);
	border-radius: 999px;
	overflow: hidden;
}

.author-portal--immaculate .project-card .progress-fill {
	background: linear-gradient(90deg, var(--api-blue), #7ee8c8);
	border-radius: 999px;
	min-height: 7px;
}

.author-portal--immaculate .project-card .project-actions .btn-small,
.author-portal--immaculate .project-card .project-actions a.btn-small {
	border-radius: 9px;
	font-weight: 700;
	min-height: 36px;
}

/* ---------- Tab headers ---------- */
.author-portal--immaculate .dashboard-tab:not(#tab-dashboard) {
	padding: 28px 28px 32px;
}

.author-portal--immaculate .apv2-tab-header {
	padding-bottom: 16px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--api-line-soft);
}

.author-portal--immaculate .apv2-tab-lede {
	font-size: 0.9rem;
	color: var(--api-muted);
}

.author-portal--immaculate .apv2-callout {
	border-radius: var(--api-radius-xs);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

/* ---------- Help / reports ---------- */
.author-portal--immaculate .apv2-help-card,
.author-portal--immaculate .apv2-report-card {
	border-radius: var(--api-radius-sm);
	border: 1px solid var(--api-line);
	box-shadow: var(--api-shadow);
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.author-portal--immaculate .apv2-help-card:hover,
.author-portal--immaculate .apv2-report-card:hover {
	transform: translateY(-2px);
	border-color: rgba(92, 125, 183, 0.35);
	box-shadow: var(--api-shadow-lg);
}

/* ---------- Account sub-nav ---------- */
.author-portal--immaculate .account-sub-nav {
	padding: 6px;
	border-radius: 14px;
	background: var(--api-surface-2);
	border: 1px solid var(--api-line);
	gap: 4px;
}

.author-portal--immaculate .account-sub-nav .account-sub-link {
	border-radius: 10px;
	font-weight: 700;
	font-size: 0.82rem;
}

.author-portal--immaculate .account-sub-nav .account-sub-link.active {
	background: var(--api-surface);
	color: var(--api-navy);
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
	border: 1px solid var(--api-line);
}

/* ---------- Project detail / phase panels ---------- */
.author-portal--immaculate .as-detail-hero {
	border-radius: var(--api-radius-sm);
	background: linear-gradient(135deg, #0a2540 0%, #123a5c 100%);
	color: #fff;
	padding: 22px 24px;
	box-shadow: var(--api-shadow);
}

.author-portal--immaculate .as-detail-hero h2 {
	color: #fff;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.author-portal--immaculate .as-section-card,
.author-portal--immaculate .as-panel-card {
	border: 1px solid var(--api-line);
	border-radius: var(--api-radius-sm);
	background: var(--api-surface);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.author-portal--immaculate #phase-detail-panel,
.author-portal--immaculate #task-detail-panel {
	border-radius: var(--api-radius-sm);
	border: 1px solid var(--api-line);
	box-shadow: var(--api-shadow);
}

.author-portal--immaculate .as-task-row {
	border-radius: 10px;
	border: 1px solid var(--api-line-soft);
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.author-portal--immaculate .as-task-row:hover {
	border-color: rgba(92, 125, 183, 0.35);
	background: var(--api-surface-2);
	box-shadow: 0 2px 10px rgba(92, 125, 183, 0.06);
}

/* ---------- Messages / email ---------- */
.author-portal--immaculate .as-messages-tab,
.author-portal--immaculate .as-email-layout {
	border-radius: var(--api-radius-sm);
}

.author-portal--immaculate .as-email-search,
.author-portal--immaculate .as-email-filter,
.author-portal--immaculate input[type="text"],
.author-portal--immaculate input[type="email"],
.author-portal--immaculate input[type="search"],
.author-portal--immaculate select,
.author-portal--immaculate textarea {
	border-radius: 10px;
	border-color: var(--api-line);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.author-portal--immaculate input:focus,
.author-portal--immaculate select:focus,
.author-portal--immaculate textarea:focus,
.author-portal--immaculate .as-email-search:focus,
.author-portal--immaculate .as-email-filter:focus {
	outline: none;
	border-color: var(--api-blue);
	box-shadow: var(--api-focus);
}

/* ---------- Royalties hub inside portal ---------- */
.author-portal--immaculate .as-royalties-hub-header h2 {
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--api-navy);
}

.author-portal--immaculate .as-royalties-hub .as-btn,
.author-portal--immaculate .as-btn {
	border-radius: 9px;
	font-weight: 700;
}

/* ---------- Mobile quicklinks ---------- */
.author-portal--immaculate .apv2-mobile-quicklinks {
	border: 1px solid var(--api-line);
	border-radius: 14px;
	box-shadow: var(--api-shadow);
	background: var(--api-surface);
}

.author-portal--immaculate .apv2-mobile-quicklinks a {
	min-height: 46px;
	font-weight: 700;
	color: var(--api-navy);
}

.author-portal--immaculate .apv2-mobile-quicklinks a:hover {
	background: var(--api-surface-2);
}

/* ---------- Buttons in portal body ---------- */
.author-portal--immaculate .dashboard-main .btn-primary {
	font-weight: 700;
	border-radius: 10px;
	box-shadow: 0 2px 8px rgba(225, 6, 0, 0.18);
}

.author-portal--immaculate .dashboard-main .btn-secondary {
	font-weight: 700;
	border-radius: 10px;
	border-width: 1.5px;
}

/* ---------- Scrollbars (WebKit) ---------- */
.author-portal--immaculate .dashboard-nav::-webkit-scrollbar,
.author-portal--immaculate .apv2-trust-bar::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

.author-portal--immaculate .dashboard-nav::-webkit-scrollbar-thumb,
.author-portal--immaculate .apv2-trust-bar::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 999px;
}

/* ---------- Mobile ---------- */
@media (max-width: 1024px) {
	.author-portal--immaculate .dashboard-container {
		padding: 16px 14px 36px;
		gap: 16px;
	}

	.author-portal--immaculate .apv2-stats {
		grid-template-columns: repeat(2, 1fr);
		padding: 16px 16px 0;
	}

	.author-portal--immaculate .apv2-panel {
		margin: 16px 16px 0;
		padding: 16px;
	}

	.author-portal--immaculate .apv2-hero {
		padding: 22px 18px 20px;
	}

	.author-portal--immaculate .apv2-welcome-note {
		margin: 12px 16px 0;
	}

	.author-portal--immaculate .dashboard-tab:not(#tab-dashboard) {
		padding: 20px 16px 24px;
	}
}

@media (max-width: 640px) {
	.author-portal--immaculate .apv2-stats {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}

	.author-portal--immaculate .apv2-stat-card__value {
		font-size: 1.4rem;
	}

	.author-portal--immaculate .apv2-hero__actions {
		width: 100%;
	}

	.author-portal--immaculate .apv2-hero__actions .btn {
		flex: 1 1 auto;
		text-align: center;
	}
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.author-portal--immaculate *,
	.author-portal--immaculate *::before,
	.author-portal--immaculate *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	.author-portal--immaculate .dashboard-main > .dashboard-tab.active {
		animation: none;
	}

	.author-portal--immaculate .apv2-stat-card:hover,
	.author-portal--immaculate .project-card:hover,
	.author-portal--immaculate .todo-section:hover {
		transform: none;
	}
}

/* ==========================================================================
   Title Setup wizard chrome (immaculate pass)
   ========================================================================== */
.author-portal--immaculate #new-title-wizard-page.wiz-chrome,
#new-title-wizard-page.wiz-chrome {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto 28px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, 0.04),
		0 16px 48px rgba(15, 23, 42, 0.1);
	overflow: hidden;
}

body.as-wizard-open .dashboard-container {
	/* Keep page breathing room when wizard is full focus */
	padding-top: 16px;
}

/* Header */
#new-title-wizard-page .wiz-chrome__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding: 16px 22px;
	color: #fff;
	background:
		radial-gradient(ellipse 70% 120% at 100% 0%, rgba(92, 125, 183, 0.35), transparent 55%),
		linear-gradient(135deg, #0a2540 0%, #123a5c 55%, #1a4a6e 100%);
	border-bottom: none;
}

#new-title-wizard-page .wiz-chrome__brand {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 12px;
}

#new-title-wizard-page .wiz-chrome__title {
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

#new-title-wizard-page .wiz-chrome__badge {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: rgba(255, 255, 255, 0.92);
}

#new-title-wizard-page .wiz-chrome__header-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 14px;
}

#new-title-wizard-page .wiz-chrome__progress {
	font-size: 0.82rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.88);
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(126, 232, 200, 0.12);
	border: 1px solid rgba(126, 232, 200, 0.28);
}

#new-title-wizard-page .wiz-chrome__exit {
	appearance: none;
	cursor: pointer;
	min-height: 40px;
	padding: 8px 14px;
	border-radius: 10px;
	font-size: 0.84rem;
	font-weight: 700;
	font-family: inherit;
	color: #0a2540 !important;
	background: #fff !important;
	border: 2px solid #fff !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
	transition: background 0.15s ease, transform 0.15s ease;
}

#new-title-wizard-page .wiz-chrome__exit:hover {
	background: #e8eef6 !important;
	transform: translateY(-1px);
}

#new-title-wizard-page .wiz-chrome__exit:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(126, 232, 200, 0.45);
}

/* Layout */
#new-title-wizard-page .wiz-chrome__layout {
	display: flex;
	min-height: min(70vh, 640px);
	background: #f8fafc;
}

#new-title-wizard-page .wiz-chrome__nav {
	width: 240px;
	flex-shrink: 0;
	background: linear-gradient(180deg, #fbfcfe 0%, #f1f5f9 100%);
	border-right: 1px solid #e2e8f0;
	padding: 14px 10px 18px;
	overflow-y: auto;
	font-size: 0.85rem;
}

#new-title-wizard-page .wiz-chrome__nav .wizard-steps-label {
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #5c7db7;
	padding: 4px 10px 10px;
	border-bottom: 1px solid #e2e8f0;
	margin: 0 4px 10px;
}

#new-title-wizard-page .wiz-chrome__nav .wizard-step-link {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	text-align: left;
	padding: 10px 12px;
	margin-bottom: 5px;
	border-radius: 10px;
	font-size: 0.8rem;
	font-weight: 600;
	font-family: inherit;
	border: 1px solid transparent;
	cursor: pointer;
	background: transparent;
	color: #334155;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

#new-title-wizard-page .wiz-chrome__nav .wizard-step-link:hover:not(.wizard-step-link--active):not(.wizard-step-link--locked) {
	background: #fff;
	border-color: #e2e8f0;
	color: #0a2540;
}

#new-title-wizard-page .wiz-chrome__nav .wizard-step-link--active {
	background: linear-gradient(90deg, rgba(92, 125, 183, 0.16) 0%, rgba(92, 125, 183, 0.06) 100%);
	color: #0a2540;
	border-color: rgba(92, 125, 183, 0.28);
	box-shadow: inset 3px 0 0 #5c7db7;
	font-weight: 800;
}

#new-title-wizard-page .wiz-chrome__nav .wizard-step-link--done {
	background: #ecfdf5;
	color: #047857;
	border-color: #a7f3d0;
}

#new-title-wizard-page .wiz-chrome__nav .wizard-step-link--locked {
	opacity: 0.55;
	cursor: default;
}

#new-title-wizard-page .wiz-chrome__main {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: #fff;
}

#new-title-wizard-page .wiz-chrome__body {
	padding: 24px 28px 20px;
	flex: 1;
	overflow: auto;
	background:
		radial-gradient(ellipse 80% 40% at 0% 0%, rgba(92, 125, 183, 0.04), transparent 50%),
		#fff;
}

/* Footer */
#new-title-wizard-page .wiz-chrome__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 14px 22px;
	border-top: 1px solid #e2e8f0;
	background: linear-gradient(180deg, #fbfcfe 0%, #f1f5f9 100%);
}

#new-title-wizard-page .wiz-chrome__footer-hint {
	margin: 0;
	font-size: 0.78rem;
	color: #64748b;
	line-height: 1.4;
	max-width: 36ch;
}

#new-title-wizard-page .wiz-chrome__footer-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
	margin-left: auto;
}

#new-title-wizard-page .wiz-chrome__footer-actions .btn {
	min-height: 44px;
	padding: 10px 18px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 0.9rem;
}

#new-title-wizard-page .wiz-chrome__btn-next {
	background: linear-gradient(135deg, #0a2540 0%, #123a5c 100%) !important;
	border-color: #0a2540 !important;
	color: #fff !important;
	box-shadow: 0 4px 14px rgba(10, 37, 64, 0.22);
}

#new-title-wizard-page .wiz-chrome__btn-next:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(10, 37, 64, 0.28);
}

#new-title-wizard-page .wiz-chrome__btn-finish {
	background: linear-gradient(135deg, #ff3338 0%, #e10600 100%) !important;
	border: none !important;
	color: #fff !important;
	box-shadow: 0 6px 18px rgba(225, 6, 0, 0.28);
	font-weight: 800;
}

#new-title-wizard-page .wiz-chrome__btn-finish:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(225, 6, 0, 0.35);
}

#new-title-wizard-page .wiz-chrome__btn-back {
	background: #fff !important;
	color: #0a2540 !important;
	border: 1.5px solid #cbd5e1 !important;
}

/* Step content chrome */
#new-title-wizard-page .wizard-body {
	max-width: 920px;
	margin: 0 auto;
}

#new-title-wizard-page .step-header {
	margin-bottom: 20px;
	padding-bottom: 14px;
	border-bottom: 1px solid #eef2f6;
}

#new-title-wizard-page .step-header h3 {
	margin: 0 0 6px;
	font-size: 1.28rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #0a2540;
}

#new-title-wizard-page .step-header .subtitle {
	color: #64748b;
	font-size: 0.9rem;
	line-height: 1.5;
}

#new-title-wizard-page .form-section {
	margin-bottom: 16px;
	padding: 18px 18px 14px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

#new-title-wizard-page .form-section h4 {
	margin: 0 0 14px;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #5c7db7;
}

#new-title-wizard-page .field {
	margin-bottom: 14px;
}

#new-title-wizard-page .field label {
	display: block;
	font-size: 0.82rem;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 6px;
}

#new-title-wizard-page .field .help {
	font-size: 0.75rem;
	color: #64748b;
	margin-top: 4px;
	line-height: 1.4;
}

#new-title-wizard-page .field input,
#new-title-wizard-page .field select,
#new-title-wizard-page .field textarea {
	width: 100%;
	padding: 11px 12px;
	font-size: 0.92rem;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	background: #fff;
	color: #0f172a;
	font-family: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	box-sizing: border-box;
}

#new-title-wizard-page .field input:focus,
#new-title-wizard-page .field select:focus,
#new-title-wizard-page .field textarea:focus {
	outline: none;
	border-color: #5c7db7;
	box-shadow: 0 0 0 3px rgba(92, 125, 183, 0.22);
}

#new-title-wizard-page .field textarea {
	min-height: 88px;
	resize: vertical;
}

#new-title-wizard-page .two-col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

#new-title-wizard-page .three-col {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 12px;
}

#new-title-wizard-page .contrib-card {
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 14px 16px;
	margin-bottom: 12px;
	background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

#new-title-wizard-page .contrib-card .card-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
	font-size: 0.84rem;
	font-weight: 800;
	color: #0a2540;
}

#new-title-wizard-page .calc-box {
	background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
	border: 1px solid #7dd3fc;
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 0.88rem;
	margin-top: 8px;
	color: #0c4a6e;
}

#new-title-wizard-page .comp-box {
	background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
	border: 1px solid #fcd34d;
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 0.88rem;
	margin-top: 8px;
	color: #78350f;
}

#new-title-wizard-page .upload-zone {
	border: 2px dashed #94a3b8;
	border-radius: 14px;
	padding: 22px 16px;
	text-align: center;
	background:
		radial-gradient(circle at 50% 0%, rgba(92, 125, 183, 0.08), transparent 55%),
		#f8fafc;
	transition: border-color 0.15s ease, background 0.15s ease;
}

#new-title-wizard-page .upload-zone:hover {
	border-color: #5c7db7;
	background: #f0f5fc;
}

#new-title-wizard-page .upload-zone input[type="file"] {
	display: block;
	margin: 10px auto 0;
}

#new-title-wizard-page .review-group {
	margin-bottom: 16px;
	padding: 14px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #f8fafc;
}

#new-title-wizard-page .review-group h5 {
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #5c7db7;
	margin: 0 0 10px;
}

#new-title-wizard-page .review-row {
	display: flex;
	gap: 12px;
	padding: 6px 0;
	border-bottom: 1px solid #eef2f6;
	font-size: 0.88rem;
}

#new-title-wizard-page .review-row:last-child {
	border-bottom: none;
}

#new-title-wizard-page .review-row .k {
	width: 168px;
	flex-shrink: 0;
	color: #64748b;
	font-weight: 600;
}

#new-title-wizard-page .review-row .v {
	flex: 1;
	color: #0f172a;
	font-weight: 500;
}

/* Horizontal stepper chips (if used in body) */
#new-title-wizard-page .wizard-stepper {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 16px;
}

#new-title-wizard-page .wizard-stepper .step {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid #e2e8f0;
	font-size: 0.78rem;
	font-weight: 700;
	color: #475569;
}

#new-title-wizard-page .wizard-stepper .step.active {
	background: #0a2540;
	color: #fff;
	border-color: #0a2540;
	box-shadow: 0 2px 8px rgba(10, 37, 64, 0.2);
}

#new-title-wizard-page .wizard-stepper .step.completed {
	background: #ecfdf5;
	border-color: #6ee7b7;
	color: #047857;
}

#new-title-wizard-page .wizard-stepper .step .num {
	width: 20px;
	height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 0.7rem;
	font-weight: 800;
	background: #e2e8f0;
	color: #475569;
}

#new-title-wizard-page .wizard-stepper .step.active .num,
#new-title-wizard-page .wizard-stepper .step.completed .num {
	background: rgba(255, 255, 255, 0.25);
	color: inherit;
}

/* Mobile */
@media (max-width: 1024px) {
	#new-title-wizard-page .wiz-chrome__layout {
		flex-direction: column;
		min-height: auto;
	}

	#new-title-wizard-page .wiz-chrome__nav {
		width: 100%;
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		border-right: none;
		border-bottom: 1px solid #e2e8f0;
		padding: 12px 10px;
		gap: 6px;
		scrollbar-width: none;
	}

	#new-title-wizard-page .wiz-chrome__nav::-webkit-scrollbar {
		display: none;
	}

	#new-title-wizard-page .wiz-chrome__nav .wizard-steps-label {
		flex: 0 0 100%;
		margin-bottom: 4px;
		border-bottom: none;
		padding-bottom: 0;
	}

	#new-title-wizard-page .wiz-chrome__nav .wizard-step-link {
		width: auto;
		flex: 0 0 auto;
		white-space: nowrap;
		margin-bottom: 0;
	}

	#new-title-wizard-page .wiz-chrome__body {
		padding: 18px 16px;
	}

	#new-title-wizard-page .two-col,
	#new-title-wizard-page .three-col {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	#new-title-wizard-page.wiz-chrome {
		border-radius: 12px;
		margin-bottom: 16px;
	}

	#new-title-wizard-page .wiz-chrome__header {
		padding: 14px 14px;
	}

	#new-title-wizard-page .wiz-chrome__footer {
		flex-direction: column;
		align-items: stretch;
	}

	#new-title-wizard-page .wiz-chrome__footer-actions {
		width: 100%;
		margin-left: 0;
	}

	#new-title-wizard-page .wiz-chrome__footer-actions .btn {
		flex: 1 1 100%;
	}

	#new-title-wizard-page .review-row {
		flex-direction: column;
		gap: 2px;
	}

	#new-title-wizard-page .review-row .k {
		width: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	#new-title-wizard-page .wiz-chrome__exit:hover,
	#new-title-wizard-page .wiz-chrome__btn-next:hover,
	#new-title-wizard-page .wiz-chrome__btn-finish:hover {
		transform: none;
	}
}
