:root {
	--primary-hue: 165deg;
	--primary-saturation: 90%;
	--primary-lightness: 50%;

	--turquoise: #00f5d6;
	--light-turquoise: #d0fdf2;
	--white: #ffffff;
	--black: #000000;
	--pink: #ff3eb5;
	--light-pink: #fdcbe3;
	--yellow: #f0f500;
	--light-yellow: #f0f596;

	--font-headers: 'Gothic A1', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-body: 'Helvetica Neue', Helvetica, Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--space-xs: 0.25rem;
	--space-sm: 0.5rem;
	--space-md: 1rem;
	--space-lg: 1.5rem;
	--space-xl: 2rem;
}

body {
	font-family: var(--font-body);
	background: linear-gradient(160deg, #0a1628 0%, #0f2027 30%, #003d33 60%, #00695c 100%) !important;
	min-height: 100vh;
}

/* Hide auto-generated page title on homepage */
.hextra-content > h1:first-child,
.content > h1:first-child,
article > h1:first-child,
main#content > h1:first-child {
	display: none !important;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-headers);
	font-weight: 700;
}

h1 {
	font-weight: 900;
}

.hextra-cards .hextra-card {
	border-color: var(--turquoise) !important;
	border-width: 2px !important;
	transition: all 0.3s ease;
}

.hextra-cards .hextra-card:hover {
	box-shadow: 0 8px 25px rgba(0, 245, 214, 0.25);
	transform: translateY(-4px);
}

.content h1 {
	margin-bottom: var(--space-lg);
}

.content h2 {
	margin-top: var(--space-xl);
	margin-bottom: var(--space-md);
}

.content h3, .content h4 {
	margin-top: var(--space-lg);
	margin-bottom: var(--space-sm);
}

.content p {
	margin-bottom: var(--space-md);
}

/* Teal link colors */
.prose a, .content a, article a {
	color: #016B66 !important;
}

.prose a:hover, .content a:hover, article a:hover {
	color: #014d4a !important;
}

.dark .prose a, .dark .content a, .dark article a {
	color: #20b2a6 !important;
}

.dark .prose a:hover, .dark .content a:hover, .dark article a:hover {
	color: #2dd4c7 !important;
}

/* Auth Screen */
body {
	opacity: 0;
	transition: opacity 0.4s ease;
}

body.auth-checked,
body.public-page {
	opacity: 1;
}

body.authenticated .auth-container {
	display: none !important;
}

.auth-container {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	align-items: center;
	justify-content: center;
	background: linear-gradient(160deg, #0a1628 0%, #0f2027 30%, #003d33 60%, #00695c 100%);
	overflow: hidden;
}

body.auth-checked:not(.authenticated) .auth-container {
	display: flex !important;
}

.auth-glow {
	position: absolute;
	border-radius: 50%;
	filter: blur(120px);
	opacity: 0.35;
	pointer-events: none;
	animation: authPulse 8s ease-in-out infinite alternate;
}

.auth-glow--1 {
	width: 500px;
	height: 500px;
	background: radial-gradient(circle, rgba(0, 245, 214, 0.4), transparent 70%);
	top: -10%;
	right: -5%;
}

.auth-glow--2 {
	width: 400px;
	height: 400px;
	background: radial-gradient(circle, rgba(0, 245, 214, 0.2), transparent 70%);
	bottom: -15%;
	left: -10%;
	animation-delay: -4s;
}

@keyframes authPulse {
	0% { transform: scale(1); opacity: 0.25; }
	100% { transform: scale(1.15); opacity: 0.4; }
}

.auth-card {
	position: relative;
	width: 90%;
	max-width: 380px;
	text-align: center;
	animation: authFadeUp 0.5s ease both;
}

@keyframes authFadeUp {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: translateY(0); }
}

.auth-logo {
	width: 160px;
	height: auto;
	margin: 0 auto 1.5rem auto;
	display: block;
}

.auth-title {
	font-size: 2.75rem;
	font-weight: 800;
	color: #fff !important;
	letter-spacing: 0.06em;
	margin: 0 0 1.5rem 0 !important;
}

.auth-subtitle {
	color: rgba(255, 255, 255, 0.45);
	font-size: 0.9rem;
	margin: 0 0 1.25rem 0 !important;
	letter-spacing: 0.01em;
}

.auth-description {
	color: rgba(255, 255, 255, 0.85) !important;
	font-size: 1.05rem;
	line-height: 1.7;
	margin: 0 0 1.75rem 0 !important;
}

.auth-privacy {
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.5) !important;
	margin: 1rem 0 0 0 !important;
}

.auth-panel {
	/* default visible */
}

.auth-panel--signup {
	display: none;
	text-align: left;
}

.auth-panel--signup.is-visible {
	display: block;
	animation: authFadeUp 0.35s ease both;
}

.auth-name-row {
	display: flex;
	gap: 0.625rem;
}

.auth-name-row .auth-field {
	flex: 1;
}

.auth-field {
	margin-bottom: 0.625rem;
}

.auth-field input {
	width: 100%;
	padding: 0.8rem 1rem;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 0.625rem;
	color: #fff;
	font-family: var(--font-body);
	font-size: 0.95rem;
	box-sizing: border-box;
	outline: none;
	transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-field input::placeholder {
	color: rgba(255, 255, 255, 0.3);
}

.auth-field input:focus {
	border-color: var(--turquoise);
	background: rgba(0, 245, 214, 0.04);
	box-shadow: 0 0 0 3px rgba(0, 245, 214, 0.08);
}

.auth-product-details {
	margin-bottom: 0.75rem;
	padding: 0.75rem 1rem;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 0.625rem;
	font-size: 0.8rem;
	line-height: 1.5;
}

.auth-product-details dl {
	margin: 0;
}

.auth-product-details dt {
	color: rgba(255, 255, 255, 0.45);
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: 0.4rem;
}

.auth-product-details dt:first-child {
	margin-top: 0;
}

.auth-product-details dd {
	color: rgba(255, 255, 255, 0.8);
	margin: 0 0 0.1rem 0;
}

.auth-checkbox {
	margin-bottom: 0.75rem;
}

.auth-checkbox label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	line-height: 1.4;
}

.auth-checkbox input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	min-width: 18px;
	margin-top: 1px;
	border: 1.5px solid rgba(255, 255, 255, 0.25);
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.06);
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-checkbox input[type="checkbox"]:checked {
	background: var(--turquoise);
	border-color: var(--turquoise);
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='%230a1628' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E");
	background-size: 14px;
	background-position: center;
	background-repeat: no-repeat;
}

.auth-checkbox input[type="checkbox"]:focus {
	box-shadow: 0 0 0 3px rgba(0, 245, 214, 0.15);
	border-color: var(--turquoise);
}

.auth-checkbox a {
	color: var(--turquoise) !important;
	text-decoration: none;
	font-weight: 600;
}

.auth-checkbox a:hover {
	text-decoration: underline;
}

.auth-error {
	display: none;
	margin-bottom: 0.75rem;
	padding: 0.6rem 0.85rem;
	background: rgba(239, 68, 68, 0.12);
	border: 1px solid rgba(239, 68, 68, 0.25);
	border-radius: 0.5rem;
	color: #fca5a5;
	font-size: 0.85rem;
	text-align: center;
}

.auth-btn {
	display: block;
	width: 100%;
	padding: 0.85rem 1.5rem;
	font-family: var(--font-headers);
	font-weight: 700;
	font-size: 1rem;
	border: none;
	border-radius: 2rem;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.15s;
	margin-bottom: 0.625rem;
}

.auth-btn:hover {
	transform: translateY(-1px);
}

.auth-btn:active {
	transform: translateY(0);
}

.auth-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.auth-btn--primary {
	background: var(--turquoise);
	color: #0a1628;
}

.auth-btn--primary:hover {
	box-shadow: 0 6px 24px rgba(0, 245, 214, 0.3);
}

.auth-btn--outline {
	background: transparent;
	color: #fff;
	border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.auth-btn--outline:hover {
	border-color: rgba(255, 255, 255, 0.5);
	box-shadow: 0 4px 16px rgba(255, 255, 255, 0.06);
}

.auth-switch {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.4);
	text-align: center;
	margin: 0.75rem 0 0 0 !important;
}

.auth-switch a {
	color: var(--turquoise) !important;
	text-decoration: none;
	font-weight: 600;
}

.auth-switch a:hover {
	text-decoration: underline;
}

.auth-support {
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.3) !important;
	margin: 2rem 0 0 0 !important;
}

.auth-support a {
	color: rgba(0, 245, 214, 0.6) !important;
	text-decoration: none;
}

.auth-support a:hover {
	color: var(--turquoise) !important;
}

/* Dashboard */
.edera-on-dashboard {
	max-width: 640px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.dashboard-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 2rem;
}

.dashboard-user-info h2 {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 0.25rem 0;
}

.dashboard-email {
	font-size: 0.875rem;
	margin: 0 !important;
}

.dashboard-ivy {
	width: 280px;
	height: auto;
	border-radius: 0.75rem;
	flex-shrink: 0;
}

.dashboard-section {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 1rem;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	backdrop-filter: blur(8px);
}

.dark .dashboard-section {
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.1);
}

.dashboard-section h3 {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 0.5rem 0;
}

.section-description {
	font-size: 0.875rem;
	margin: 0 0 1rem 0 !important;
	opacity: 0.6;
}

.dashboard-section label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.5rem;
	opacity: 0.6;
}

.dashboard-section input[type="text"] {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid rgba(128, 128, 128, 0.3);
	border-radius: 0.5rem;
	font-size: 1rem;
	margin-bottom: 1rem;
	box-sizing: border-box;
	outline: none;
	transition: border-color 0.2s;
}

.dashboard-section input[type="text"]:focus {
	border-color: var(--turquoise);
}

.dashboard-section button {
	width: 100%;
	padding: 0.75rem 1.5rem;
	background: var(--turquoise);
	color: #0a1628;
	font-weight: 700;
	font-size: 1rem;
	border: none;
	border-radius: 2rem;
	cursor: pointer;
	transition: all 0.2s;
}

.dashboard-section button:hover {
	transform: scale(1.02);
	box-shadow: 0 4px 15px rgba(0, 245, 214, 0.3);
}

.dashboard-section button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.dashboard-footer {
	text-align: center;
	padding: 1rem 0;
}

.dashboard-footer p {
	font-size: 0.8rem;
	opacity: 0.5;
	margin: 0.25rem 0 !important;
}

.license-error {
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid rgba(239, 68, 68, 0.3);
	border-radius: 0.5rem;
	color: #fca5a5;
	font-size: 0.875rem;
}

.license-result {
	border-color: rgba(0, 245, 214, 0.3) !important;
}

.license-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.license-header h3 {
	margin: 0 !important;
}

.dashboard-section .reveal-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: none;
	border: 1px solid rgba(128, 128, 128, 0.3);
	font-size: 0.8rem;
	padding: 0.4rem 0.75rem;
	border-radius: 1rem;
	cursor: pointer;
	width: auto;
}

.dashboard-section .reveal-btn:hover {
	color: var(--turquoise);
	border-color: rgba(0, 245, 214, 0.3);
	transform: none;
	box-shadow: none;
	background: none;
}

.license-details {
	margin-top: 1rem;
}

.result-field {
	margin-bottom: 0.75rem;
}

.result-field:last-child {
	margin-bottom: 0;
}

.result-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.25rem;
	opacity: 0.5;
}

.result-field code {
	display: block;
	padding: 0.5rem 0.75rem;
	background: rgba(0, 245, 214, 0.08);
	border: 1px solid rgba(0, 245, 214, 0.15);
	border-radius: 0.375rem;
	color: var(--turquoise);
	font-size: 0.875rem;
	word-break: break-all;
}

.license-key-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.license-key-row code {
	flex: 1;
}

.license-key-actions {
	display: flex;
	gap: 0.25rem;
	flex-shrink: 0;
}

.license-key-actions .copy-btn {
	position: static;
	transform: none;
}

.license-key-actions .copy-btn:hover {
	transform: none !important;
}

.result-commands {
	margin-top: 1rem;
}

.command-block {
	position: relative;
	margin-bottom: 0.5rem;
}

.command-block code {
	display: block;
	padding: 0.65rem 2.5rem 0.65rem 0.75rem;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(128, 128, 128, 0.2);
	border-radius: 0.375rem;
	font-size: 0.8rem;
	font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
	white-space: pre-wrap;
	word-break: break-all;
}

.copy-btn {
	position: absolute;
	top: 50%;
	right: 0.5rem;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.25rem;
	width: auto !important;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
	opacity: 0.5;
}

.copy-btn:hover {
	color: var(--turquoise);
	transform: translateY(-50%) !important;
	box-shadow: none !important;
	background: none !important;
	opacity: 1;
}

.deactivate-btn {
	margin-top: 1.25rem;
	background: transparent !important;
	color: #f87171 !important;
	border: 1px solid rgba(248, 113, 113, 0.3) !important;
	font-size: 0.85rem;
	padding: 0.6rem 1.5rem;
}

.deactivate-btn:hover {
	background: rgba(248, 113, 113, 0.1) !important;
	border-color: rgba(248, 113, 113, 0.5) !important;
	transform: none !important;
	box-shadow: none !important;
}

/* On public pages, hide our custom auth navbar (Hextra's navbar handles docs) */
body.public-page .nav-container:not(.hextra-nav-container) {
	display: none !important;
}

/* Navbar background — match page gradient */
.hextra-nav-container-blur {
	background: transparent !important;
	box-shadow: 0 1px 0 rgba(0, 245, 214, 0.1) !important;
}

/* Constrain navbar logo */
.hextra-nav-container img[src*="logo"] {
	width: 200px !important;
	height: 40px !important;
	object-fit: contain !important;
}

/* Steps — plain numbers without circles */
.hextra-steps :where(h2, h3, h4, h5, h6):before {
	background: none !important;
	border: none !important;
	border-radius: 0 !important;
	color: var(--turquoise) !important;
	font-weight: 700 !important;
}

/* Hide breadcrumb */
div[class*="hx:mt-1.5"][class*="hx:text-sm"][class*="hx:text-gray-500"] {
	display: none !important;
}

/* Hide prev/next page navigation */
div[class*="hx:mb-8"][class*="hx:border-t"][class*="hx:pt-8"] {
	display: none !important;
}

/* Hide TOC back-to-top section */
div:has(> #backToTop) {
	display: none !important;
}

/* License Agreement Page */
.license-agreement {
	max-width: 720px;
	margin: 2rem auto;
	padding: 0 1rem;
	line-height: 1.7;
}

.license-agreement h2 {
	margin-top: 2rem;
	margin-bottom: 0.75rem;
}

.license-agreement ul {
	padding-left: 1.5rem;
}

.license-agreement ul li {
	margin-bottom: 0.35rem;
}
