@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Fira+Code:wght@400;500&display=swap');

/* ==========================================================================
   guides.css — Styles for guides.html (guide listing page)
   ========================================================================== */

body {
	background: #090d16;
	color: #ffffff;
}

/* ── Hero ───────────────────────────────────────────────── */
.guides-hero {
	padding: 14rem 2rem 8rem;
	text-align: center;
	position: relative;
	background: #090d16;
	overflow: hidden;
}

.guides-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
	background-size: 50px 50px;
	pointer-events: none;
}

.guides-hero h5 {
	font-family: 'Poppins', sans-serif;
	font-size: 1.3rem;
	font-weight: 600;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: #8da8d7;
	margin-bottom: 2rem;
}

.guides-hero h1 {
	font-size: clamp(3.2rem, 6vw, 5.6rem);
	font-weight: 800;
	color: #ffffff;
	line-height: 1.15;
	margin-bottom: 2.5rem;
}

.guides-hero p {
	font-size: clamp(1.55rem, 2.5vw, 1.8rem);
	color: #a1a1a1;
	max-width: 58rem;
	margin: 0 auto;
	line-height: 1.7;
}

/* ── Guides list section ────────────────────────────────── */
.guides-section {
	padding: 8rem 0 12rem;
	background: #0a0c10;
}

.guides-section-header {
	text-align: center;
	margin-bottom: 6rem;
	padding: 0 2rem;
}

.guides-section-header h2 {
	font-size: clamp(2.4rem, 4vw, 3rem);
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 1.2rem;
}

.guides-section-header p {
	font-size: 1.6rem;
	color: #a1a1a1;
}

.guides-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(32rem, 100%), 1fr));
	gap: 3rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 3rem;
}

/* ── Guide card ─────────────────────────────────────────── */
.guide-card {
	display: flex;
	flex-direction: column;
	background: #161b22;
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 16px;
	padding: 3.5rem;
	text-decoration: none;
	transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
	position: relative;
	overflow: hidden;
}

.guide-card::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(141, 168, 215, 0.04) 0%, transparent 60%);
	opacity: 0;
	transition: opacity 0.35s ease;
	pointer-events: none;
}

.guide-card:hover {
	transform: translateY(-6px);
	border-color: rgba(141, 168, 215, 0.3);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(141, 168, 215, 0.07);
}

.guide-card:hover::after {
	opacity: 1;
}

.guide-card.coming-soon {
	opacity: 0.45;
	cursor: default;
	pointer-events: none;
}

/* ── Card tags ──────────────────────────────────────────── */
.guide-tags {
	display: flex;
	gap: 0.8rem;
	flex-wrap: wrap;
	margin-bottom: 2.2rem;
}

.guide-tag {
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	padding: 0.35rem 1.1rem;
	border-radius: 10rem;
	border: 1px solid rgba(141, 168, 215, 0.25);
	color: #8da8d7;
}

.guide-tag.live {
	background: rgba(141, 168, 215, 0.1);
	border-color: rgba(141, 168, 215, 0.4);
}

.guide-tag.soon {
	background: rgba(255, 255, 255, 0.03);
	border-color: rgba(255, 255, 255, 0.08);
	color: #555;
}

/* ── Card body ──────────────────────────────────────────── */
.guide-card h3 {
	font-size: 2rem;
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 1.4rem;
	line-height: 1.3;
}

.guide-card p {
	font-size: 1.5rem;
	color: #a1a1a1;
	line-height: 1.75;
	margin-bottom: 0;
	flex: 1;
}

.guide-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 2.8rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-card-meta {
	font-size: 1.2rem;
	color: #555;
	letter-spacing: 0.03em;
}

.guide-card-arrow {
	width: 3.8rem;
	height: 3.8rem;
	border-radius: 50%;
	background: rgba(141, 168, 215, 0.08);
	border: 1px solid rgba(141, 168, 215, 0.18);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #8da8d7;
	font-size: 1.5rem;
	transition: all 0.28s ease;
	flex-shrink: 0;
}

.guide-card:hover .guide-card-arrow {
	background: #8da8d7;
	color: #090d16;
	transform: translateX(3px);
}

.guide-interactive-badge {
	position: absolute;
	top: 2.2rem;
	right: 2.2rem;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	background: rgba(16, 185, 129, 0.1);
	color: #10b981;
	border: 1px solid rgba(16, 185, 129, 0.28);
	padding: 0.35rem 1rem;
	border-radius: 10rem;
}

/* ── Mobile ─────────────────────────────────────────────── */
@media only screen and (max-width: 768px) {
	.guides-hero {
		padding: 10rem 2rem 5rem;
	}

	.guides-section {
		padding: 5rem 0 8rem;
	}

	.guides-section-header {
		margin-bottom: 4rem;
	}

	.guides-grid {
		grid-template-columns: 1fr;
		padding: 0 1.8rem;
		gap: 2rem;
	}

	.guide-card {
		padding: 2.8rem 2.4rem;
	}

	.guide-interactive-badge {
		font-size: 0.9rem;
		top: 1.8rem;
		right: 1.8rem;
		padding: 0.3rem 0.9rem;
	}

	.guide-card h3 {
		font-size: 1.85rem;
		padding-right: 8rem;
	}
}

@media only screen and (max-width: 480px) {
	.guide-card h3 {
		padding-right: 0;
		margin-top: 3.5rem;
	}

	.guide-interactive-badge {
		top: 2.8rem;
	}
}

/* ==========================================================================
   Guide inner page styles — claude-code-pro.html (and future guide pages)
   ========================================================================== */

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar {
	width: 5px;
	height: 5px;
}

::-webkit-scrollbar-track {
	background: #0a0c10;
}

::-webkit-scrollbar-thumb {
	background: #2a2f3a;
	border-radius: 3px;
}

/* ── Chart ───────────────────────────────────────────── */
.chart-container {
	position: relative;
	width: 100%;
	max-width: 800px;
	margin: 0 auto;
	height: 300px;
}

@media (max-width: 640px) {
	.chart-container {
		height: 210px;
	}
}

/* ── Code block ──────────────────────────────────────── */
.code-block {
	background: #0d1117;
	color: #c9d1d9;
	padding: 1.2rem 1.4rem;
	border-radius: 0.5rem;
	font-family: 'Fira Code', monospace;
	overflow-x: auto;
	border: 1px solid #21262d;
	font-size: 0.85rem;
	line-height: 1.65;
	white-space: pre;
}

/* ── Animation ───────────────────────────────────────── */
.fade-in {
	animation: fadeIn 0.22s ease-out both;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(5px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ── Section visibility ──────────────────────────────── */
.view-section {
	display: none;
}

.view-section.active {
	display: block;
}

/* ════════════════════════════════════════════════════════
   LAYOUT — mobile-first
════════════════════════════════════════════════════════ */

/* Back bar — always visible, sticky */
.back-bar {
	position: sticky;
	top: 0;
	z-index: 200;
	background: #0d1117;
	border-bottom: 1px solid #21262d;
	padding: 0.8rem 1.2rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
}

.back-bar a {
	color: #8da8d7;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	transition: color 0.2s;
}

.back-bar a:hover {
	color: #fff;
}

.back-bar-sep,
.back-bar-current {
	font-size: 0.85rem;
	color: #444;
}

.back-bar-current {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 18ch;
}

/* Mobile chapter tabs — shown only on mobile */
.mobile-tabs {
	position: sticky;
	top: 41px;
	z-index: 190;
	display: flex;
	overflow-x: auto;
	gap: 0.5rem;
	padding: 0.7rem 1rem;
	background: #111418;
	border-bottom: 1px solid #21262d;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.mobile-tabs::-webkit-scrollbar {
	display: none;
}

.mobile-tab {
	white-space: nowrap;
	flex-shrink: 0;
	padding: 0.38rem 1rem;
	border-radius: 2rem;
	font-size: 0.8rem;
	font-weight: 500;
	color: #666;
	background: transparent;
	border: 1px solid #21262d;
	cursor: pointer;
	transition: all 0.2s;
}

.mobile-tab.active {
	background: rgba(141, 168, 215, 0.12);
	border-color: #8da8d7;
	color: #8da8d7;
	font-weight: 600;
}

/* Desktop sidebar nav item */
.nav-item {
	transition: all 0.15s;
}

.nav-item.active {
	background: rgba(141, 168, 215, 0.1);
	border-left: 3px solid #8da8d7;
	color: #fff;
	font-weight: 600;
}

/* Layout wrapper */
.guide-layout {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

/* Sidebar — hidden on mobile */
.guide-sidebar {
	display: none;
}

/* Main content — full width on mobile, scrollable */
.guide-main {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* ── Desktop overrides (≥ 768px) ─────────────────────── */
@media (min-width: 768px) {

	/* Fix total height and enable independent column scrolling */
	html:has(.guide-layout),
	body:has(.guide-layout) {
		height: 100%;
		overflow: hidden;
	}

	.mobile-tabs {
		display: none;
	}

	.guide-layout {
		flex-direction: row;
		overflow: hidden;
		flex: 1;
		min-height: 0;
	}

	.guide-sidebar {
		display: flex;
		flex-direction: column;
		width: 15rem;
		flex-shrink: 0;
		border-right: 1px solid #21262d;
		overflow-y: auto;
		background: #111418;
	}

	.guide-main {
		overflow-y: auto;
	}
}

/* ── Accordion ───────────────────────────────────────── */
.accordion-content {
	display: none;
}

.accordion-content.open {
	display: block;
}

/* ── Specific to Token Optimization Guide ──────────────── */
.nav-btn {
	color: #8b949e;
	transition: all 0.2s;
}

.nav-btn:hover {
	background-color: rgba(255, 255, 255, 0.05);
	color: #c9d1d9;
}

.nav-btn.active {
	background-color: rgba(141, 168, 215, 0.1);
	color: #8da8d7;
	font-weight: 600;
	border-left: 0px solid transparent;
	border-bottom: 3px solid #8da8d7;
}

@media (min-width: 768px) {
	.nav-btn.active {
		border-bottom: 0;
		border-left: 3px solid #8da8d7;
	}
}

.tab-content {
	display: none;
	animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
	display: block;
}

.card {
	background: #111418;
	border: 1px solid #21262d;
	border-radius: 0.75rem;
}