/* Shared subpage layout (delete-account, tech) */

.page--sub {
	flex: 1;
}

.brand-link {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: inherit;
	text-decoration: none;
}

.brand-link:hover .brand-name {
	color: var(--accent);
}

.subpage-container {
	max-width: 56rem;
	width: 100%;
	margin: 0 auto;
	flex: 1;
}

/* --- Delete account --- */

.subpage-header {
	margin-bottom: 1.75rem;
}

.subpage-header .badge {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 0.75rem;
	border-radius: 999px;
	background: var(--card);
	border: 1px solid var(--card-border);
	color: var(--text);
	font-size: 0.85rem;
	font-weight: 600;
}

.subpage-header h1 {
	margin-top: 0.9rem;
	font-family: "Sora", sans-serif;
	font-weight: 700;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	line-height: 1.12;
	letter-spacing: -0.02em;
}

.subpage-header p {
	margin-top: 0.75rem;
	color: var(--text-dim);
	max-width: 62ch;
	line-height: 1.65;
}

.subpage-card {
	background: var(--card);
	border: 1px solid var(--card-border);
	border-radius: 1.25rem;
	overflow: hidden;
}

.subpage-card-inner {
	padding: 1.75rem;
}

.subpage-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
}

.subpage-section {
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid var(--card-border);
	border-radius: 1rem;
	padding: 1.25rem;
}

.subpage-section h2 {
	font-family: "Sora", sans-serif;
	font-size: 1.05rem;
	font-weight: 600;
	margin-bottom: 0.65rem;
}

.subpage-section p,
.subpage-section li {
	color: var(--text-dim);
	line-height: 1.6;
}

.subpage-section p {
	margin-bottom: 0.75rem;
}

.subpage-section ol,
.subpage-section ul {
	padding-left: 1.1rem;
}

.subpage-section li {
	margin-bottom: 0.5rem;
}

.subpage-note {
	margin-top: 0.9rem;
	padding: 0.75rem;
	border-radius: 0.75rem;
	border: 1px solid rgba(var(--accent-rgb), 0.25);
	background: rgba(var(--accent-rgb), 0.08);
	color: var(--text);
	font-size: 0.95rem;
}

.subpage-divider {
	margin: 1.4rem 0;
	border: 0;
	border-top: 1px solid var(--card-border);
}

.subpage-actions {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-top: 0.5rem;
}

.subpage-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.25rem;
	border-radius: 0.75rem;
	font-size: 0.92rem;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid transparent;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.subpage-btn-danger {
	background: #ef4444;
	color: #fff;
	box-shadow: 0 8px 24px rgba(239, 68, 68, 0.2);
}

.subpage-btn-danger:hover {
	background: #dc2626;
	transform: translateY(-1px);
}

.subpage-btn-outline {
	background: transparent;
	border-color: var(--card-border);
	color: var(--text);
}

.subpage-btn-outline:hover {
	border-color: rgba(255, 255, 255, 0.22);
	background: var(--card-hover);
	transform: translateY(-1px);
}

.subpage-small {
	color: var(--text-dim);
	font-size: 0.92rem;
}

.subpage-footer-note {
	margin-top: 0.65rem;
	color: var(--text-dim);
	font-size: 0.9rem;
}

.subpage-section a:not(.subpage-btn) {
	color: var(--text);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.subpage-section a:not(.subpage-btn):hover {
	color: var(--accent);
}

/* --- Tech page --- */

.tech-hero {
	text-align: center;
	padding: 1rem 0 2.5rem;
}

.tech-hero h1 {
	font-family: "Sora", sans-serif;
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin-bottom: 0.75rem;
}

.tech-hero h1 strong {
	font-weight: 700;
	color: var(--accent);
}

.tech-hero p {
	color: var(--text-dim);
	max-width: 38rem;
	margin: 0 auto;
	font-size: 1.05rem;
	line-height: 1.55;
}

.tech-main {
	padding-bottom: 3rem;
}

.flow-chart-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	max-width: 87.5rem;
	margin: 0 auto;
	padding: 0 0.5rem;
}

@media (min-width: 1024px) {
	.flow-chart-container {
		grid-template-columns: 250px 60px 250px 60px 300px 60px 250px;
		align-items: center;
		justify-content: center;
		gap: 0;
	}
}

.flow-connector-arrow {
	display: none;
}

@media (min-width: 1024px) {
	.flow-connector-arrow {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 100%;
		color: rgba(255, 255, 255, 0.1);
		padding-top: 30px;
		animation: pulse-arrow 2s infinite;
	}
}

@keyframes pulse-arrow {
	0%, 100% {
		transform: translateX(0);
		opacity: 0.1;
	}
	50% {
		transform: translateX(5px);
		opacity: 0.35;
		color: var(--accent);
	}
}

.flow-col {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	position: relative;
	z-index: 2;
	justify-content: center;
	height: 100%;
}

.col-header {
	text-align: center;
	font-family: "Sora", sans-serif;
	font-weight: 600;
	font-size: 0.85rem;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin-bottom: 1.5rem;
}

.col-header::after {
	content: "";
	display: block;
	width: 2.5rem;
	height: 2px;
	background: var(--card-border);
	margin: 0.6rem auto 0;
}

.col-header-accent {
	color: var(--accent);
}

.flow-node {
	background: var(--card);
	border: 1px solid var(--card-border);
	padding: 1.25rem;
	border-radius: 0.75rem;
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
	min-height: 6.25rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.flow-node:hover {
	border-color: rgba(var(--accent-rgb), 0.35);
	background: var(--card-hover);
	transform: scale(1.02);
}

.flow-node-accent {
	border-color: rgba(var(--accent-rgb), 0.3);
	background: rgba(var(--accent-rgb), 0.04);
}

.node-label {
	font-size: 0.7rem;
	text-transform: uppercase;
	color: var(--text-dim);
	letter-spacing: 0.08em;
	margin-bottom: 0.5rem;
	font-weight: 600;
}

.node-label-accent {
	color: var(--accent);
}

.node-title {
	font-family: "Sora", sans-serif;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--text);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.node-title-accent {
	color: var(--accent);
}

.node-detail {
	font-size: 0.8rem;
	color: var(--text-dim);
	margin-top: 0.5rem;
	line-height: 1.5;
}

.node-detail-light {
	color: rgba(255, 255, 255, 0.78);
}

.prompt-dot {
	width: 8px;
	height: 8px;
	background: var(--accent);
	border-radius: 50%;
	box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
	animation: pulse-dot 2s infinite;
}

.mini-eq {
	display: flex;
	gap: 3px;
	height: 12px;
	align-items: flex-end;
}

.mini-bar {
	width: 3px;
	background: var(--text);
	animation: eq 1s infinite;
}

.mini-bar:nth-child(2) {
	animation-delay: 0.1s;
	height: 80%;
}

.mini-bar:nth-child(3) {
	animation-delay: 0.2s;
	height: 60%;
}

.history-stack {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.stack-layer {
	height: 2px;
	width: 20px;
	background: #555;
}

.stack-layer.active {
	background: var(--accent);
	width: 30px;
	box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.5);
}

.ai-core-container {
	width: 280px;
	height: 280px;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
}

.core-ring {
	position: absolute;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 50%;
}

.core-ring.outer {
	width: 100%;
	height: 100%;
	border-style: dotted;
	animation: rotate 30s linear infinite;
}

.core-ring.inner {
	width: 70%;
	height: 70%;
	border-color: rgba(var(--accent-rgb), 0.3);
	animation: rotate 15s linear infinite reverse;
	box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.1);
}

.core-center {
	width: 130px;
	height: 130px;
	background: radial-gradient(circle, rgba(var(--accent-rgb), 0.25), transparent);
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 10;
	border: 1px solid rgba(var(--accent-rgb), 0.3);
	box-shadow: 0 0 60px rgba(var(--accent-rgb), 0.2);
	animation: breathe 4s ease-in-out infinite;
}

.core-icon {
	font-size: 2rem;
}

.core-label {
	font-family: "Sora", sans-serif;
	font-weight: 700;
	font-size: 0.9rem;
	margin-top: 5px;
	color: var(--text);
}

.core-sublabel {
	font-size: 0.6rem;
	letter-spacing: 1px;
	color: var(--accent);
}

.core-caption {
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	text-align: center;
	margin-top: 1rem;
	color: var(--text-dim);
	font-size: 0.8rem;
	line-height: 1.6;
}

.feedback-card {
	border-color: var(--accent);
	background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.06), transparent);
}

.feedback-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	background: rgba(var(--accent-rgb), 0.18);
	color: var(--accent);
	font-size: 0.6rem;
	margin-bottom: 5px;
}

.flow-footnote {
	text-align: center;
	margin-top: 1rem;
	font-size: 0.7rem;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 1px;
}

@keyframes rotate {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

@keyframes pulse-dot {
	0%, 100% { opacity: 0.5; transform: scale(0.8); }
	50% { opacity: 1; transform: scale(1.2); }
}

@keyframes breathe {
	0%, 100% { box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.1); }
	50% { box-shadow: 0 0 60px rgba(var(--accent-rgb), 0.35); }
}

@keyframes eq {
	0%, 100% { height: 40%; }
	50% { height: 100%; }
}

@media (max-width: 900px) {
	.subpage-grid {
		grid-template-columns: 1fr;
	}

	.subpage-card-inner {
		padding: 1.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.flow-connector-arrow,
	.prompt-dot,
	.core-ring,
	.core-center,
	.mini-bar {
		animation: none;
	}

	.flow-node:hover {
		transform: none;
	}
}
