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

:root {
	--ink: #111210;
	--paper: #F8F7F3;
	--muted: #6B6A63;
	--border: #E0DED6;
	--accent: #1A6B45;
	--accent-light: #EBF4EE;
	--serif: 'Cormorant Garamond', Georgia, serif;
	--sans: 'Manrope', sans-serif;
	--surface: #fff;
}

body {
	font-family: var(--sans);
	background: var(--paper);
	color: var(--ink);
	min-height: 100vh;
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.access-checking main,
body.access-checking footer {
	display: none;
}

nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 48px;
	border-bottom: 1px solid var(--border);
	background: #fff;
	position: sticky;
	top: 0;
	z-index: 10;
}

.logo {
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 500;
	color: var(--ink);
	text-decoration: none;
	letter-spacing: 0.1px;
}

.logo span { color: var(--accent); }

.nav-breadcrumb {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--muted);
}

.nav-breadcrumb a {
	color: var(--accent);
	text-decoration: none;
}

.nav-breadcrumb a:hover { text-decoration: underline; }

.crumb-active { color: var(--muted); }

.access-gate {
	min-height: calc(100vh - 70px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.access-gate-card {
	max-width: 460px;
	width: 100%;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 28px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.access-gate-kicker {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--accent);
	background: var(--accent-light);
	padding: 5px 12px;
	border-radius: 999px;
	margin-bottom: 16px;
}

.access-gate h1 {
	font-family: var(--serif);
	font-size: clamp(28px, 4vw, 38px);
	font-weight: 400;
	line-height: 1.1;
	margin-bottom: 10px;
	letter-spacing: -0.2px;
}

.access-gate p {
	font-size: 15px;
	line-height: 1.6;
	color: var(--muted);
	margin-bottom: 18px;
}

.access-gate-status {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	font-weight: 400;
	color: var(--ink);
}

.access-spinner {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid var(--border);
	border-top-color: var(--accent);
	animation: accessSpin 0.8s linear infinite;
}

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

main {
	max-width: 860px;
	margin: 0 auto;
	padding: 52px 24px 80px;
}

.page-header { margin-bottom: 36px; }

.exam-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--accent);
	background: var(--accent-light);
	padding: 5px 12px;
	border-radius: 20px;
	margin-bottom: 14px;
}

.page-header h1 {
	font-family: var(--serif);
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 400;
	letter-spacing: -0.35px;
	margin-bottom: 8px;
}

.page-header p {
	font-size: 15px;
	color: var(--muted);
	max-width: 620px;
	line-height: 1.65;
}

.stats-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-bottom: 32px;
}

.stat-card {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.stat-value {
	font-size: 20px;
	font-weight: 400;
	color: var(--ink);
	letter-spacing: -0.1px;
}

.stat-label {
	font-size: 11px;
	color: var(--muted);
	letter-spacing: 0.2px;
}

.papers-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.paper-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 20px 24px;
	text-decoration: none;
	color: var(--ink);
	gap: 16px;
	transition: border-color .2s, box-shadow .2s, transform .15s;
	position: relative;
	overflow: hidden;
}

.paper-card::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--accent);
	border-radius: 12px 0 0 12px;
	opacity: 0;
	transition: opacity .2s;
}

.paper-card:hover {
	border-color: var(--accent);
	box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
	transform: translateX(3px);
}

.paper-card:hover::before { opacity: 1; }

.paper-left {
	display: flex;
	align-items: center;
	gap: 20px;
	flex: 1;
	min-width: 0;
}

.paper-number {
	font-family: var(--serif);
	font-size: 30px;
	color: var(--border);
	font-weight: 400;
	flex-shrink: 0;
	line-height: 1;
	width: 36px;
	transition: color .2s;
}

.paper-card:hover .paper-number { color: var(--accent); }

.paper-info { min-width: 0; }

.paper-top {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}

.paper-top h2 {
	font-family: var(--serif);
	font-size: 19px;
	font-weight: 400;
	text-transform: lowercase;
	letter-spacing: -0.2px;
}

.paper-badge {
	font-size: 10px;
	font-weight: 400;
	letter-spacing: .6px;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 4px;
}

.paper-badge.premium {
	background: #F5F0E8;
	color: #8B6914;
}

.paper-meta {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
}

.paper-meta span {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	color: var(--muted);
}

.paper-meta svg {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
}

.paper-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	flex-shrink: 0;
}

.paper-score-mini {
	font-size: 12px;
	color: var(--muted);
	line-height: 1;
	min-height: 1em;
}

.paper-status {
	font-size: 12px;
	font-weight: 400;
	padding: 4px 10px;
	border-radius: 20px;
}

.paper-status.not-started {
	background: var(--paper);
	color: var(--muted);
	border: 1px solid var(--border);
}

.paper-status.in-progress {
	background: #FBF0E8;
	color: #B35A1A;
	border: 1px solid #F0CDA8;
}

.paper-status.completed {
	background: var(--accent-light);
	color: var(--accent);
	border: 1px solid #B2D9C3;
}

.btn-start {
	font-size: 13px;
	font-weight: 400;
	color: var(--accent);
	white-space: nowrap;
}

footer {
	border-top: 1px solid var(--border);
	padding: 28px 48px;
	display: none;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	color: var(--muted);
}

body.ready footer {
	display: flex;
}

@media (max-width: 640px) {
	nav { padding: 16px 20px; }
	main { padding: 36px 16px 60px; }
	.stats-row { grid-template-columns: repeat(2, 1fr); }
	.paper-card { flex-direction: column; align-items: flex-start; }
	.paper-right { width: 100%; align-items: flex-start; }
	.paper-meta { gap: 10px; }
	.nav-breadcrumb { display: none; }
	footer {
		padding: 22px 16px 26px;
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
}
