:root {
	/* Primary */
  --color-primary: #4a67f5;
	--color-primary-hover: #3651de;

  /* Danger */
  --color-danger: #d64545;
  --color-danger-hover: #c63c3c;

	/* Background */
  --color-bg: #fafafa;
  --color-bg-elevated: #ffffff;
	--color-bg-header: #f4f5f7;

	/* Text */
	--color-text: #333;
	--color-text-muted: #666;
	--color-text-header: #333;
	--color-text-inverse: #fff;
	--color-text-emphasis: #1a1a2e;

	/* Border */
	--color-border-default: #e0e0e0;
	--color-border-muted: #ededed;
	--color-border-divider: #f2f2f2;

  /* Focus */
  --color-focus-ring: rgba(67, 97, 238, 0.4);
}


@media (prefers-color-scheme: dark) {
	:root {
		/* Primary */
		--color-primary: #6b8aff;
		--color-primary-hover: #5a7aff;

		/* Background */
		--color-bg: #121212;
		--color-bg-elevated: #1e1e1e;
		--color-bg-header: #1a1a1a;

		/* Text */
		--color-text: #e0e0e0;
		--color-text-muted: #999;
		--color-text-header: #e0e0e0;
		--color-text-inverse: #fff;
		--color-text-emphasis: #fff;

		/* Border */
		--color-border-default: #333;
		--color-border-muted: #2a2a2a;
		--color-border-divider: #252525;
	}
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: system-ui, -apple-system, sans-serif;
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-bg);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

#site-header {
	background: var(--color-bg-header);
	padding: 1rem 2rem;
	border-bottom: 1px solid var(--color-border-muted);
}

@media (max-width: 768px) {
	#site-header {
		padding: 1rem 1rem;
	}
}

#site-header-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

#site-header .logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--color-primary);
	font-weight: bold;
	font-size: 1.5rem;
	text-decoration: none;
}

#site-header a.logo,
#site-header a.logo:hover {
	color: var(--color-primary);
}

.site-header-left {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

#site-header ul {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

#site-header-nav a {
	color: var(--color-text-muted);
	text-decoration: none;
	transition: color 0.15s;
}

#site-header-nav a:hover {
	color: var(--color-text);
}

#site-header-nav .btn {
	padding: 0.5rem 1rem;
	color: var(--color-text-inverse);
}

#site-header-nav .btn:hover {
	color: var(--color-text-inverse);
}

#site-header-nav form {
	display: contents;
}

/* Mobile visibility utilities */
.show-mobile {
	display: none !important;
}

@media (max-width: 768px) {
	.hide-mobile {
		display: none !important;
	}

	.show-mobile {
		display: inline-flex !important;
	}
}

main {
	flex: 1;
	max-width: 1200px;
	margin: 0 auto;
	padding: 2rem;
	width: 100%;
}

@media (max-width: 768px) {
	main {
		padding: 1rem;
	}
}

#site-footer {
	padding: 1rem 2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--color-text-muted);
	border-top: 1px solid var(--color-border-muted);
}

@media (max-width: 768px) {
	#site-footer {
		padding: 1rem;
	}
}

#site-footer a {
	color: var(--color-text-muted);
	text-decoration: none;
}

#site-footer a:hover {
	color: var(--color-text);
}

#site-footer .logo {
	font-weight: bold;
}

#site-footer-nav {
	display: flex;
	gap: 1.5rem;
}

h1 {
	margin-bottom: 1rem;
}

a {
	color: var(--color-text-muted);
	text-decoration: underline;
}

a:hover {
	color: var(--color-text);
}

.page-title {
	text-align: center;
}

.page-subtitle {
	text-align: center;
	font-size: 1.25rem;
	font-weight: normal;
	color: var(--color-text-muted);
	margin-top: 0.5rem;
}

.page-description {
	text-align: center;
	color: var(--color-text-muted);
}

.hero {
	text-align: center;
}

.hero .btn {
	margin-top: 2rem;
}

.home-blurb {
	max-width: 540px;
	margin: 2rem auto 0;
	text-align: center;
	color: var(--color-text-muted);
	line-height: 1.7;
}

.home-links {
	display: flex;
	justify-content: center;
	gap: 3rem;
	margin-top: 2rem;
	flex-wrap: wrap;
}

@media (max-width: 480px) {
	.home-links {
		flex-direction: column;
		align-items: center;
		gap: 2rem;
	}
}

.data-icon {
	display: flex;
	flex-direction: column;
	align-items: center;
	color: #444;
}

.data-icon h2 {
	font-size: 1rem;
	font-weight: bold;
	margin-top: 0.5rem;
}

.data-icon h2 a {
	color: var(--color-text);
	text-decoration: none;
}

.data-icon-link {
	color: inherit;
	transition: color 0.2s ease;
}

.data-icon h2 a {
	transition: color 0.2s ease;
}

.data-icon:hover .data-icon-link,
.data-icon:hover h2 a {
	color: var(--color-primary);
}


/* Data Formats Page */
.formats-list {
	max-width: 720px;
	margin: 2rem auto;
}

.format-section {
	margin-bottom: 3rem;
	scroll-margin-top: 2rem;
}

.format-section h2 {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
	color: var(--color-text);
}

.format-section p {
	color: var(--color-text-muted);
	margin-bottom: 1rem;
}

.format-section pre {
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 8px;
	padding: 1rem;
	overflow-x: auto;
}

.format-section code {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--color-text);
}

.page-cta {
	text-align: center;
	margin: 3rem 0 2rem;
}

/* Pricing */
.pricing-tiers {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	align-items: center;
	margin-top: 2rem;
}

@media (min-width: 768px) {
	.pricing-tiers {
		flex-direction: row;
		justify-content: center;
		align-items: stretch;
	}
}

.tier {
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 8px;
	padding: 2rem;
	text-align: center;
	width: 100%;
	display: flex;
	flex-direction: column;
}

@media (min-width: 768px) {
	.tier {
		max-width: 300px;
	}
}

.tier h2 {
	margin-bottom: 0.5rem;
}

.tier .price {
	font-size: 2rem;
	font-weight: bold;
	color: var(--color-text-emphasis);
	margin-bottom: 1.5rem;
}

.tier ul {
	list-style: none;
	margin-bottom: 1.5rem;
	text-align: left;
	flex: 1;
}

.tier li {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--color-border-divider);
}

.tier li:last-child {
	border-bottom: none;
}

.btn {
	display: inline-block;
	background: var(--color-primary);
	color: var(--color-text-inverse);
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 4px;
	font: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
	background: var(--color-primary-hover);
	color: var(--color-text-inverse);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:active {
	transform: scale(0.96);
}

.tier .btn {
	max-width: 160px;
	align-self: center;
}

.btn-ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	background: transparent;
	border: 1px solid var(--color-border-default);
	border-radius: 8px;
	color: var(--color-text-muted);
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-ghost:hover {
	background: rgba(128, 128, 128, 0.1);
	border-color: var(--color-text-muted);
	color: var(--color-text);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-ghost:active {
	transform: scale(0.96);
}

#site-header .btn-ghost {
	color: var(--color-text-muted);
}

#site-header .btn-ghost:hover {
	color: var(--color-text);
}

.tier.featured {
	border-color: var(--color-primary);
	border-width: 2px;
}

.tier.current {
	border-color: var(--color-primary);
	border-width: 2px;
}

.tier-badge {
	display: inline-block;
	background: var(--color-primary);
	color: var(--color-text-inverse);
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	margin-bottom: 0.5rem;
}

.btn-current {
	background: var(--color-border-default);
	color: var(--color-text-muted);
	cursor: default;
}

.btn-current:hover {
	background: var(--color-border-default);
	color: var(--color-text-muted);
	transform: none;
	box-shadow: none;
}

/* My Plan Page */
.my-plan {
	max-width: 1000px;
	margin: 0 auto;
}

.my-plan-header {
	text-align: center;
	margin-bottom: 3rem;
}

.my-plan-header .page-title {
	margin-bottom: 0.5rem;
}

.my-plan-header .page-description {
	color: var(--color-text-muted);
}

.my-plan-content {
	margin-bottom: 3rem;
}

.my-plan-footer {
	text-align: center;
}

.plan-change-error {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 2rem;
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-error, #dc2626);
	border-radius: 8px;
	text-align: center;
	max-width: 400px;
	margin: 0 auto;
}

.plan-change-error p {
	color: var(--color-error, #dc2626);
	margin: 0;
}

.plan-downgrade-blocked {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 2rem;
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-warning, #f59e0b);
	border-radius: 8px;
	text-align: center;
	max-width: 500px;
	margin: 0 auto;
}

.plan-downgrade-blocked h3 {
	color: var(--color-warning, #f59e0b);
	margin: 0;
}

.plan-downgrade-blocked p {
	margin: 0;
	line-height: 1.6;
}

.plan-downgrade-actions {
	display: flex;
	gap: 1rem;
	margin-top: 0.5rem;
}

/* Auth */
.auth-card {
	max-width: 400px;
	width: 100%;
	margin: 3rem auto;
	padding: 2.5rem;
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 12px;
	text-align: center;
}

.auth-card .page-title {
	margin-bottom: 0.5rem;
}

.auth-card .page-description {
	margin-bottom: 2rem;
}

.btn-oauth {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	width: 100%;
	padding: 0.875rem 1.5rem;
	background: var(--color-bg);
	border: 1px solid var(--color-border-default);
	border-radius: 6px;
	color: var(--color-text);
	text-decoration: none;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-oauth:hover {
	background: var(--color-border-divider);
	border-color: var(--color-text-muted);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-oauth:active {
	transform: scale(0.96);
}

.btn-oauth svg {
	flex-shrink: 0;
}

.auth-terms {
	margin-top: 1.5rem;
	font-size: 0.8rem;
	color: var(--color-text-muted);
}

.auth-divider {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 1.5rem 0;
	color: var(--color-text-muted);
	font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--color-border-default);
}

.auth-error {
	background: var(--color-danger-bg, #fef2f2);
	color: var(--color-danger, #dc2626);
	padding: 0.75rem 1rem;
	border-radius: 6px;
	margin-bottom: 1.5rem;
	font-size: 0.875rem;
}

.auth-icon {
	margin-bottom: 1rem;
}

.auth-icon svg {
	width: 48px;
	height: 48px;
	color: var(--color-primary);
}

.auth-instructions {
	margin-bottom: 1.5rem;
	color: var(--color-text-muted);
}

.auth-hint {
	font-size: 0.875rem;
	margin-top: 0.5rem;
}

/* Forms */
.auth-form {
	text-align: left;
	margin-bottom: 1rem;
}

.form-group {
	margin-bottom: 1rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	font-size: 0.875rem;
	color: var(--color-text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	font-family: inherit;
	background: var(--color-bg);
	border: 1px solid var(--color-border-default);
	border-radius: 6px;
	color: var(--color-text);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input::placeholder {
	color: var(--color-text-muted);
}

.form-group input:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px var(--color-primary-alpha, rgba(99, 102, 241, 0.15));
}

/* Primary button */
.btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0.875rem 1.5rem;
	background: var(--color-primary);
	border: none;
	border-radius: 6px;
	color: var(--color-text-inverse);
	font-size: 1rem;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
	background: var(--color-primary-hover);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
	transform: scale(0.96);
}

/* Secondary button */
.btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0.875rem 1.5rem;
	background: transparent;
	border: 1px solid var(--color-border-default);
	border-radius: 6px;
	color: var(--color-text);
	font-size: 1rem;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-secondary:hover {
	background: var(--color-border-divider);
	border-color: var(--color-text-muted);
	color: var(--color-text);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active {
	transform: scale(0.96);
}

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

.btn-secondary:disabled:hover {
	background: transparent;
	border-color: var(--color-border-default);
	transform: none;
	box-shadow: none;
}

/* Dashboard */
.dashboard {
	max-width: 800px;
	margin: 0 auto;
}

.dashboard-header {
	margin-bottom: 2rem;
}

.dashboard-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
}

/* Profile Card */
.profile-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 400px;
	width: 100%;
	padding: 2rem;
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 12px;
	text-align: center;
}

.profile-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin-bottom: 1rem;
	background: var(--color-primary);
	border-radius: 50%;
	color: var(--color-text-inverse);
	font-size: 1.75rem;
	font-weight: 600;
}

.profile-header {
	margin-bottom: 1.5rem;
}

.profile-email {
	font-size: 1.125rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	word-break: break-word;
}

.profile-plan-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background: var(--color-bg-subtle, rgba(128, 128, 128, 0.1));
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-text-muted);
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}

a.profile-plan-badge:hover {
	background: var(--color-primary);
	color: var(--color-text-inverse);
}

.profile-details {
	width: 100%;
}

.profile-actions {
	width: 100%;
	padding-top: 1rem;
	border-top: 1px solid var(--color-border-default);
	margin-top: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.profile-actions a,
.profile-actions button {
	width: 100%;
	text-align: center;
}

/* Legal */
.legal-content {
	max-width: 720px;
	margin: 2rem auto;
}

.legal-content section {
	margin-bottom: 2rem;
}

.legal-content h2 {
	font-size: 1.25rem;
	margin-bottom: 0.75rem;
	color: var(--color-text);
}

.legal-content p {
	margin-bottom: 1rem;
}

.legal-content ul {
	margin: 1rem 0;
	padding-left: 1.5rem;
}

.legal-content li {
	margin-bottom: 0.5rem;
}

/* Error Pages */
.error-page {
	text-align: center;
	padding: 4rem 2rem;
}

.error-code {
	display: block;
	font-size: 6rem;
	font-weight: bold;
	line-height: 1;
	color: var(--color-text-muted);
	margin-bottom: 0.5rem;
}

.error-message {
	color: var(--color-text-muted);
	margin-bottom: 2rem;
}

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* Screen reader only - visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Sidebar */
.sidebar-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s, visibility 0.2s;
	z-index: 100;
}

.sidebar-overlay.open {
	opacity: 1;
	visibility: visible;
}

.sidebar {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 280px;
	max-width: 80vw;
	background: var(--color-bg-elevated);
	border-right: 1px solid var(--color-border-default);
	transform: translateX(-100%);
	transition: transform 0.2s ease-out;
	z-index: 101;
	display: flex;
	flex-direction: column;
}

.sidebar.open {
	transform: translateX(0);
}

.sidebar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem;
	border-bottom: 1px solid var(--color-border-divider);
}

.sidebar-logo,
.sidebar-logo:hover {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--color-primary);
	text-decoration: none;
	font-weight: bold;
}

.sidebar-nav {
	display: flex;
	flex-direction: column;
	padding: 0.5rem;
}

.sidebar-nav-header {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-text-muted);
	padding: 0.75rem 1rem 0.25rem;
}

.sidebar-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	color: var(--color-text);
	text-decoration: none;
	border-radius: 6px;
	transition: background 0.15s;
}

.sidebar-link-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	opacity: 0;
	transition: opacity 0.15s;
	color: var(--color-primary);
}

.sidebar-link-icon svg {
	width: 16px;
	height: 16px;
	display: block;
}

.sidebar-link:hover {
	background: var(--color-border-divider);
	color: var(--color-text);
}

.sidebar-link:hover .sidebar-link-icon {
	opacity: 1;
}

/* HWSS Animation */
.hwss-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 3rem auto;
	max-width: 500px;
}

.hwss-grid {
	width: 100%;
	max-width: 500px;
	height: auto;
	color: var(--color-text-muted);
}

.hwss-grid .cell {
	fill: var(--color-primary);
}

/* Glide across the screen */
.hwss-ship {
	animation: hwss-glide 6s linear infinite;
}

@keyframes hwss-glide {
	0% {
		transform: translateX(-70px);
		opacity: 0;
	}
	8% {
		opacity: 1;
	}
	92% {
		opacity: 1;
	}
	100% {
		transform: translateX(180px);
		opacity: 0;
	}
}

/* 4-phase walking cycle */
.hwss-phase {
	opacity: 0;
}

.phase-0 {
	animation: phase0 1.6s steps(1) infinite;
}

.phase-1 {
	animation: phase1 1.6s steps(1) infinite;
}

.phase-2 {
	animation: phase2 1.6s steps(1) infinite;
}

.phase-3 {
	animation: phase3 1.6s steps(1) infinite;
}

/* Each phase visible for 25% of the cycle */
@keyframes phase0 {
	0%, 100% { opacity: 1; }
	25% { opacity: 0; }
}

@keyframes phase1 {
	0% { opacity: 0; }
	25% { opacity: 1; }
	50% { opacity: 0; }
}

@keyframes phase2 {
	0% { opacity: 0; }
	50% { opacity: 1; }
	75% { opacity: 0; }
}

@keyframes phase3 {
	0% { opacity: 0; }
	75% { opacity: 1; }
	100% { opacity: 0; }
}

.hwss-label {
	margin-top: 1rem;
	font-size: 0.875rem;
	color: var(--color-text-muted);
	text-align: center;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
	.hwss-ship {
		animation: none;
		transform: translateX(60px);
	}

	.hwss-phase {
		animation: none;
	}

	.phase-0 {
		opacity: 1;
	}

	.phase-1,
	.phase-2,
	.phase-3 {
		opacity: 0;
	}
}

/* Pulsar Animation (period-3 oscillator) */
.pulsar-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 2rem auto;
	max-width: 200px;
}

.pulsar-grid {
	width: 100%;
	max-width: 200px;
	height: auto;
	color: var(--color-text-muted);
}

.pulsar-grid .cell {
	fill: var(--color-primary);
}

/* 3-phase walking cycle */
.pulsar-phase {
	opacity: 0;
}

.pulsar-phase-0 {
	animation: pulsar-p0 1.8s steps(1) infinite;
}

.pulsar-phase-1 {
	animation: pulsar-p1 1.8s steps(1) infinite;
}

.pulsar-phase-2 {
	animation: pulsar-p2 1.8s steps(1) infinite;
}

/* Each phase visible for 33.33% of the cycle */
@keyframes pulsar-p0 {
	0%, 100% { opacity: 1; }
	33.33% { opacity: 0; }
}

@keyframes pulsar-p1 {
	0% { opacity: 0; }
	33.33% { opacity: 1; }
	66.66% { opacity: 0; }
}

@keyframes pulsar-p2 {
	0% { opacity: 0; }
	66.66% { opacity: 1; }
	100% { opacity: 0; }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
	.pulsar-phase {
		animation: none;
	}

	.pulsar-phase-0 {
		opacity: 1;
	}

	.pulsar-phase-1,
	.pulsar-phase-2 {
		opacity: 0;
	}
}

/* Toad Animation (period-2 oscillator) */
.toad-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 2rem auto;
	max-width: 160px;
}

.toad-grid {
	width: 100%;
	max-width: 160px;
	height: auto;
	color: var(--color-text-muted);
}

.toad-grid .cell {
	fill: var(--color-primary);
}

/* 2-phase oscillation */
.toad-phase {
	opacity: 0;
}

.toad-phase-0 {
	animation: toad-p0 1.2s steps(1) infinite;
}

.toad-phase-1 {
	animation: toad-p1 1.2s steps(1) infinite;
}

/* Each phase visible for 50% of the cycle */
@keyframes toad-p0 {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

@keyframes toad-p1 {
	0% { opacity: 0; }
	50% { opacity: 1; }
	100% { opacity: 0; }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
	.toad-phase {
		animation: none;
	}

	.toad-phase-0 {
		opacity: 1;
	}

	.toad-phase-1 {
		opacity: 0;
	}
}

/* ========================================
   Component Showcase (Admin)
   ======================================== */

.showcase {
	max-width: 1200px;
	margin: 0 auto;
}

.showcase-header {
	text-align: center;
	margin-bottom: 3rem;
}

.showcase-header h1 {
	margin-bottom: 0.5rem;
}

.showcase-header p {
	color: var(--text-muted);
}

.showcase-section {
	margin-bottom: 4rem;
}

.showcase-section-title {
	font-size: 1.25rem;
	border-bottom: 1px solid var(--border);
	padding-bottom: 0.5rem;
	margin-bottom: 1rem;
}

.showcase-description {
	margin-bottom: 1.5rem;
	color: var(--text-muted);
}

.showcase-description code {
	background: var(--bg-subtle);
	padding: 0.125rem 0.375rem;
	border-radius: 0.25rem;
	font-size: 0.875rem;
}

.showcase-demo {
	display: flex;
	justify-content: center;
	gap: 2rem;
	flex-wrap: wrap;
}

.showcase-item {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.showcase-item-label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--text-muted);
	margin-bottom: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* ========================================
   Dashboard Cards
   ======================================== */

.dashboard-cards {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	width: 100%;
	max-width: 800px;
}

@media (min-width: 768px) {
	.dashboard-cards {
		flex-direction: row;
		justify-content: center;
	}
}

/* ========================================
   Agents Card (Dashboard Summary)
   ======================================== */

.agents-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 400px;
	width: 100%;
	padding: 2rem;
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 12px;
	text-align: center;
}

.agents-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin-bottom: 1rem;
	background: var(--color-primary);
	border-radius: 50%;
	color: var(--color-text-inverse);
}

.agents-avatar svg {
	width: 36px;
	height: 36px;
}

.agents-header {
	margin-bottom: 1.5rem;
}

.agents-title {
	font-size: 1.125rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.agents-count-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background: var(--color-bg-subtle, rgba(128, 128, 128, 0.1));
	border-radius: 9999px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--color-text-muted);
}

.agents-details {
	width: 100%;
}

.agents-actions {
	width: 100%;
	padding-top: 1rem;
	border-top: 1px solid var(--color-border-default);
	margin-top: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.agents-actions a,
.agents-actions button {
	width: 100%;
	text-align: center;
}

/* ========================================
   My Agents Page
   ======================================== */

.my-agents {
	max-width: 900px;
	margin: 0 auto;
}

.my-agents-header {
	text-align: center;
	margin-bottom: 2rem;
}

.my-agents-header .page-title {
	margin-bottom: 0.5rem;
}

.my-agents-header .page-description {
	color: var(--color-text-muted);
}

.my-agents-actions {
	margin-top: 1.5rem;
}

.my-agents-actions .btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.agents-limit-message {
	color: var(--color-text-muted);
	font-size: 0.875rem;
}

.agents-limit-message a {
	color: var(--color-primary);
}

.my-agents-content {
	margin-bottom: 2rem;
}

.my-agents-footer {
	text-align: center;
}

/* Agents Tabs */
.agents-tabs {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
}

.agents-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.5rem;
	background: transparent;
	border: 1px solid var(--color-border-default);
	border-radius: 6px;
	color: var(--color-text);
	font-size: 1rem;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.agents-tab:hover {
	background: var(--color-border-divider);
	border-color: var(--color-text-muted);
	color: var(--color-text);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.agents-tab:active {
	transform: scale(0.96);
}

.agents-tab-active {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-text-inverse);
}

.agents-tab-active:hover {
	background: var(--color-primary-hover);
	border-color: var(--color-primary-hover);
	color: var(--color-text-inverse);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Agents List */
.agents-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.agents-empty {
	text-align: center;
	padding: 3rem 2rem;
	color: var(--color-text-muted);
	background: var(--color-bg-elevated);
	border: 1px dashed var(--color-border-default);
	border-radius: 8px;
}

/* ========================================
   Agent Edit Card
   ======================================== */

.agent-edit-card {
	width: 100%;
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 12px;
	padding: 1.5rem;
}

.agent-edit-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.agent-edit-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: var(--color-primary);
	border-radius: 50%;
	color: var(--color-text-inverse);
	flex-shrink: 0;
}

.agent-edit-avatar svg {
	width: 24px;
	height: 24px;
}

.agent-edit-info {
	flex: 1;
	min-width: 0;
}

.agent-edit-name {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.25rem 0;
	word-break: break-word;
}

.agent-edit-created {
	font-size: 0.75rem;
	color: var(--color-text-muted);
}

.agent-status {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	flex-shrink: 0;
}

.agent-status-active {
	background: rgba(34, 197, 94, 0.1);
	color: #16a34a;
}

@media (prefers-color-scheme: dark) {
	.agent-status-active {
		background: rgba(34, 197, 94, 0.2);
		color: #4ade80;
	}
}

.agent-status-inactive {
	background: rgba(156, 163, 175, 0.1);
	color: #6b7280;
}

@media (prefers-color-scheme: dark) {
	.agent-status-inactive {
		background: rgba(156, 163, 175, 0.2);
		color: #9ca3af;
	}
}

.agent-edit-body {
	margin-bottom: 1rem;
}

/* API Key Display */
.api-key-display {
	background: var(--color-bg);
	border: 1px solid var(--color-border-default);
	border-radius: 8px;
	padding: 0.75rem 1rem;
}

.api-key-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--color-text-muted);
	margin-bottom: 0.5rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.api-key-field {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.api-key-value {
	flex: 1;
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.875rem;
	color: var(--color-text);
	word-break: break-all;
}

/* Icon Button */
.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--color-border-default);
	border-radius: 6px;
	color: var(--color-text-muted);
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
	flex-shrink: 0;
}

.icon-btn:hover {
	background: var(--color-border-divider);
	border-color: var(--color-text-muted);
	color: var(--color-text);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.icon-btn:active {
	transform: scale(0.95);
}

/* Copy feedback */
.icon-btn .icon-copy,
.icon-btn .icon-check {
	display: flex;
	align-items: center;
	justify-content: center;
}

.icon-btn .icon-check {
	display: none;
	color: #16a34a;
}

.icon-btn.copied .icon-copy {
	display: none;
}

.icon-btn.copied .icon-check {
	display: flex;
}

.icon-btn.copied {
	border-color: #16a34a;
	background: rgba(34, 197, 94, 0.1);
}

/* Agent Edit Actions */
.agent-edit-actions {
	display: flex;
	gap: 0.75rem;
	padding-top: 1rem;
	border-top: 1px solid var(--color-border-default);
	flex-wrap: wrap;
}

.btn-sm {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
}

.btn-sm svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* Data Sources */
.data-sources-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-top: 2rem;
}

.data-source-card {
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 12px;
	padding: 1.5rem;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.data-source-card:hover {
	border-color: var(--color-primary);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.data-source-header {
	margin-bottom: 0.75rem;
}

.data-source-name {
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0;
	color: var(--color-text);
}

.data-source-description {
	color: var(--color-text-muted);
	margin: 0;
	line-height: 1.6;
}

.data-sources-empty {
	text-align: center;
	padding: 3rem 2rem;
	color: var(--color-text-muted);
	background: var(--color-bg-elevated);
	border: 1px dashed var(--color-border-default);
	border-radius: 8px;
	margin-top: 2rem;
}

/* External Link Indicator */
a[target="_blank"]::after {
	content: "";
	display: inline-block;
	width: 0.75em;
	height: 0.75em;
	margin-left: 0.25em;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
	vertical-align: middle;
	opacity: 0.7;
}

a[target="_blank"]:hover::after {
	opacity: 1;
}

/* ========================================
   Admin Dashboard
   ======================================== */

.admin-nav {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	width: 100%;
	max-width: 600px;
}

.admin-section {
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 12px;
	padding: 1.5rem;
}

.admin-section .section-title {
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-text-muted);
	margin-bottom: 1rem;
}

.admin-links {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.admin-link {
	display: flex;
	flex-direction: column;
	padding: 1rem;
	background: var(--color-bg);
	border: 1px solid var(--color-border-default);
	border-radius: 8px;
	text-decoration: none;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.admin-link:hover {
	border-color: var(--color-primary);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transform: translateY(-1px);
}

.admin-link.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.admin-link-title {
	font-weight: 600;
	color: var(--color-text);
	margin-bottom: 0.25rem;
}

.admin-link-desc {
	font-size: 0.875rem;
	color: var(--color-text-muted);
}

/* ========================================
   Admin Recipes
   ======================================== */

.admin-recipes {
	max-width: 800px;
	margin: 0 auto;
}

.admin-recipes-header {
	text-align: center;
	margin-bottom: 2rem;
}

.admin-recipes-header .page-title {
	margin-bottom: 0.5rem;
}

.admin-recipes-content {
	margin-bottom: 2rem;
}

.admin-recipes-footer {
	text-align: center;
}

.recipes-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.recipes-empty {
	text-align: center;
	padding: 3rem 2rem;
	color: var(--color-text-muted);
	background: var(--color-bg-elevated);
	border: 1px dashed var(--color-border-default);
	border-radius: 8px;
}

.recipe-card {
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 12px;
	padding: 1.5rem;
}

.recipe-card-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 0.5rem;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.recipe-card-name {
	font-size: 1.125rem;
	font-weight: 600;
	margin: 0;
}

.recipe-card-slug {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.75rem;
	color: var(--color-text-muted);
	background: var(--color-bg);
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
}

.recipe-card-meta {
	font-size: 0.875rem;
	color: var(--color-text-muted);
	margin-bottom: 1rem;
}

.recipe-card-actions {
	display: flex;
	gap: 0.5rem;
}

/* ========================================
   Recipe Edit Page
   ======================================== */

.recipe-edit {
	max-width: 900px;
	margin: 0 auto;
}

.recipe-edit-header {
	text-align: center;
	margin-bottom: 2rem;
}

.recipe-edit-header .page-title {
	margin-bottom: 0.5rem;
}

.recipe-edit-header code {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.875rem;
	color: var(--color-text-muted);
	background: var(--color-bg-elevated);
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
}

.recipe-edit-content {
	margin-bottom: 2rem;
}

.recipe-edit-error {
	background: rgba(214, 69, 69, 0.1);
	color: var(--color-danger);
	padding: 1rem;
	border-radius: 8px;
	margin-bottom: 1.5rem;
	border: 1px solid var(--color-danger);
}

.recipe-edit-success {
	background: rgba(34, 197, 94, 0.1);
	color: #16a34a;
	padding: 1rem;
	border-radius: 8px;
	margin-bottom: 1.5rem;
	border: 1px solid #16a34a;
}

@media (prefers-color-scheme: dark) {
	.recipe-edit-success {
		color: #4ade80;
		border-color: #4ade80;
	}
}

.recipe-edit-form {
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 12px;
	padding: 2rem;
}

.recipe-edit-form .form-group {
	margin-bottom: 1.5rem;
}

.recipe-edit-form label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: var(--color-text);
}

.recipe-edit-form input[type="text"] {
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	background: var(--color-bg);
	border: 1px solid var(--color-border-default);
	border-radius: 6px;
	color: var(--color-text);
}

.recipe-edit-form input[type="text"]:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.recipe-edit-form textarea {
	width: 100%;
	padding: 1rem;
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.875rem;
	line-height: 1.5;
	background: var(--color-bg);
	border: 1px solid var(--color-border-default);
	border-radius: 6px;
	color: var(--color-text);
	resize: vertical;
	tab-size: 2;
}

.recipe-edit-form textarea:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px var(--color-focus-ring);
}

.checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
	width: 1.25rem;
	height: 1.25rem;
	cursor: pointer;
}

.recipe-edit-actions {
	display: flex;
	gap: 1rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--color-border-default);
}

.recipe-edit-actions .btn {
	width: auto;
}

.recipe-edit-footer {
	text-align: center;
}

.recipe-edit-meta {
	display: flex;
	justify-content: center;
	gap: 2rem;
	color: var(--color-text-muted);
}

/* Welcome Popup */
.welcome-popup {
	position: fixed;
	bottom: 1rem;
	right: 1rem;
	width: 320px;
	z-index: 1000;
	display: none;
	transform: translateY(20px);
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 480px) {
	.welcome-popup {
		display: none !important;
	}
}

.welcome-popup-content {
	position: relative;
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 12px;
	padding: 1.5rem;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.welcome-popup-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background: none;
	border: none;
	padding: 0.25rem;
	cursor: pointer;
	color: var(--color-text-muted);
	line-height: 1;
	border-radius: 4px;
	transition: color 0.15s, background 0.15s;
}

.welcome-popup-close:hover {
	color: var(--color-text);
	background: var(--color-border-divider);
}

.welcome-popup-close svg {
	width: 16px;
	height: 16px;
	display: block;
}

.welcome-popup-header {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.welcome-popup-logo {
	flex-shrink: 0;
	color: var(--color-primary);
}

.welcome-popup-logo svg {
	width: 32px;
	height: 32px;
}

.welcome-popup-title {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 0.125rem;
	color: var(--color-text-emphasis);
}

.welcome-popup-description {
	font-size: 0.875rem;
	color: var(--color-text-muted);
}

.welcome-popup-options {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.btn-oauth-sm {
	padding: 0.625rem 1rem;
	font-size: 0.875rem;
}

.btn-oauth-sm svg {
	width: 18px;
	height: 18px;
}

.welcome-popup-divider {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0.75rem 0;
	color: var(--color-text-muted);
	font-size: 0.75rem;
}

.welcome-popup-divider::before,
.welcome-popup-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--color-border-default);
}

.welcome-popup-footer {
	margin-top: 1rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--color-border-muted);
	text-align: center;
}

.welcome-popup-footer a {
	font-size: 0.75rem;
	color: var(--color-text-muted);
	text-decoration: none;
}

.welcome-popup-footer a:hover {
	color: var(--color-primary);
}

/* ========================================
   Contact Page
   ======================================== */

.contact-page {
	max-width: 600px;
	margin: 0 auto;
}

.contact-header {
	text-align: center;
	margin-bottom: 2rem;
}

.contact-header .page-title {
	margin-bottom: 0.5rem;
}

.contact-form {
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 12px;
	padding: 2rem;
}

.contact-form .form-group {
	margin-bottom: 1.5rem;
}

.contact-form select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	padding-right: 2.5rem;
}

.contact-form textarea {
	resize: vertical;
	min-height: 120px;
}

.contact-error {
	background: rgba(214, 69, 69, 0.1);
	color: var(--color-danger);
	padding: 1rem;
	border-radius: 8px;
	margin-bottom: 1.5rem;
	border: 1px solid var(--color-danger);
}

.contact-success {
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 12px;
	padding: 3rem 2rem;
	text-align: center;
}

.contact-success h2 {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
	color: #16a34a;
}

@media (prefers-color-scheme: dark) {
	.contact-success h2 {
		color: #4ade80;
	}
}

.contact-success p {
	color: var(--color-text-muted);
	margin-bottom: 1.5rem;
}

.contact-success .btn-primary {
	width: auto;
	display: inline-flex;
}

/* Honeypot field - hidden from users */
.hp-field {
	position: absolute;
	left: -9999px;
	opacity: 0;
	height: 0;
	overflow: hidden;
}

/* ========================================
   Admin Contacts
   ======================================== */

.admin-contacts {
	max-width: 900px;
	margin: 0 auto;
}

.admin-contacts-header {
	text-align: center;
	margin-bottom: 2rem;
}

.admin-contacts-header .page-title {
	margin-bottom: 0.5rem;
}

.admin-contacts-content {
	margin-bottom: 2rem;
}

.admin-contacts-footer {
	text-align: center;
}

/* Contacts Tabs (reuse agents-tab pattern) */
.contacts-tabs {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
}

.contacts-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.5rem;
	background: transparent;
	border: 1px solid var(--color-border-default);
	border-radius: 6px;
	color: var(--color-text);
	font-size: 1rem;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.contacts-tab:hover {
	background: var(--color-border-divider);
	border-color: var(--color-text-muted);
	color: var(--color-text);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contacts-tab:active {
	transform: scale(0.96);
}

.contacts-tab-active {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-text-inverse);
}

.contacts-tab-active:hover {
	background: var(--color-primary-hover);
	border-color: var(--color-primary-hover);
	color: var(--color-text-inverse);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Contacts List */
.contacts-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.contacts-empty {
	text-align: center;
	padding: 3rem 2rem;
	color: var(--color-text-muted);
	background: var(--color-bg-elevated);
	border: 1px dashed var(--color-border-default);
	border-radius: 8px;
}

/* Contact Card */
.contact-card {
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border-default);
	border-radius: 12px;
	padding: 1.5rem;
}

.contact-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 1rem;
	gap: 1rem;
}

.contact-card-info {
	flex: 1;
	min-width: 0;
}

.contact-card-email {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 0.25rem 0;
	word-break: break-word;
}

.contact-card-reason {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	background: var(--color-bg);
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--color-text-muted);
}

.contact-card-date {
	font-size: 0.75rem;
	color: var(--color-text-muted);
	white-space: nowrap;
}

.contact-card-body {
	margin-bottom: 1rem;
}

.contact-card-message {
	margin: 0;
	line-height: 1.6;
	color: var(--color-text);
	white-space: pre-wrap;
	word-break: break-word;
}

.contact-card-actions {
	display: flex;
	gap: 0.75rem;
	padding-top: 1rem;
	border-top: 1px solid var(--color-border-default);
	flex-wrap: wrap;
}

/* Infinite scroll load more */
.contacts-load-more {
	text-align: center;
	padding: 1.5rem;
	color: var(--color-text-muted);
}

.loading-indicator {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}
