/* =========================================================
   PASSPORT LEDGER — design tokens
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
	/* Colour: deep ink navy + parchment paper + muted maple wax-seal red + brass */
	--ink: #16232f;
	--ink-90: #1d2f3d;
	--ink-20: rgba(22,35,47,0.2);
	--ink-10: rgba(22,35,47,0.1);
	--paper: #f7f2e7;
	--paper-dim: #efe8d8;
	--maple: #a13d2f;
	--maple-dark: #7f2f24;
	--brass: #a3822f;
	--white: #fffdf8;
	--green: #3f6b4a;

	--font-display: 'Fraunces', Georgia, serif;
	--font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	--radius: 6px;
	--shadow-card: 0 2px 10px rgba(22,35,47,0.08), 0 1px 2px rgba(22,35,47,0.06);
	--container: 1120px;
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--maple); }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip-link {
	position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--white);
	padding: 12px 20px; z-index: 200; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
	display: inline-flex; align-items: center; gap: 8px;
	font-family: var(--font-body); font-weight: 600; font-size: 1rem;
	padding: 13px 24px; border-radius: var(--radius); border: 2px solid transparent;
	text-decoration: none; cursor: pointer; transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--maple); color: var(--white); }
.btn-primary:hover { background: var(--maple-dark); color: var(--white); }
.btn-ghost { background: transparent; border-color: var(--ink-20); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-large { padding: 16px 32px; font-size: 1.05rem; }

.link-arrow { font-weight: 600; text-decoration: none; display: inline-block; margin-top: 8px; }
.link-arrow:hover { text-decoration: underline; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header { background: var(--paper); border-bottom: 1px solid var(--ink-10); position: sticky; top: 0; z-index: 100; }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.site-logo-mark { color: var(--maple); display: inline-flex; }
.site-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.site-logo-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.site-logo-sub { font-size: 0.72rem; color: var(--ink-90); opacity: 0.65; letter-spacing: 0.03em; }

.primary-nav-list { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.primary-nav-list a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.primary-nav-list a:hover { color: var(--maple); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; }
.mobile-nav { border-top: 1px solid var(--ink-10); padding: 10px 24px 20px; }
.mobile-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.mobile-nav-list a { color: var(--ink); text-decoration: none; font-weight: 600; }

@media (max-width: 860px) {
	.primary-nav { display: none; }
	.nav-toggle { display: flex; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--maple); margin-bottom: 14px; }
.hero-lede { font-size: 1.15rem; color: var(--ink-90); max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin: 28px 0; flex-wrap: wrap; }
.hero-trust { list-style: none; display: flex; gap: 28px; padding: 0; margin: 20px 0 0; border-top: 1px solid var(--ink-10); padding-top: 20px; flex-wrap: wrap; }
.hero-trust strong { display: block; font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); }
.hero-trust li { font-size: 0.85rem; color: var(--ink-90); }
.passport-art { width: 100%; height: auto; }

@media (max-width: 900px) {
	.hero-inner { grid-template-columns: 1fr; }
	.hero-visual { order: -1; max-width: 320px; margin: 0 auto; }
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: 64px 0; }
.section-lede { max-width: 62ch; color: var(--ink-90); font-size: 1.05rem; }
.section-chapters { background: var(--white); border-top: 1px solid var(--ink-10); border-bottom: 1px solid var(--ink-10); }

.chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-top: 36px; }
.chapter-card {
	background: var(--paper); border: 1px solid var(--ink-10); border-radius: var(--radius);
	padding: 22px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px;
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.chapter-card:hover { border-color: var(--maple); transform: translateY(-2px); }
.chapter-num { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--maple); }
.chapter-card h3 { margin: 0; font-size: 1.05rem; }
.chapter-meta { font-size: 0.85rem; color: var(--ink-90); opacity: 0.7; }

.two-col { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.steps { padding-left: 22px; }
.steps li { margin-bottom: 14px; }

.stat-card { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: 32px; }
.stat-card h3 { color: var(--white); }
.stat-list { display: grid; gap: 14px; margin: 20px 0 0; }
.stat-list > div { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.12); padding-bottom: 10px; }
.stat-list dt { opacity: 0.7; }
.stat-list dd { margin: 0; font-weight: 700; }

.faq-list { display: grid; gap: 12px; margin-top: 28px; }
.faq-item { background: var(--white); border: 1px solid var(--ink-10); border-radius: var(--radius); padding: 18px 22px; }
.faq-item summary { cursor: pointer; font-weight: 600; font-family: var(--font-display); }
.faq-item p { margin: 12px 0 0; color: var(--ink-90); }

.section-cta { background: var(--maple); color: var(--white); text-align: center; }
.section-cta h2 { color: var(--white); }
.cta-inner .btn-primary { background: var(--white); color: var(--maple); }
.cta-inner .btn-primary:hover { background: var(--paper); }

/* =========================================================
   BREADCRUMBS
   ========================================================= */
.pl-breadcrumbs { margin: 28px 0 0; }
.pl-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: 0.85rem; color: var(--ink-90); opacity: 0.75; }
.pl-breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 6px; }
.pl-breadcrumbs a { color: inherit; text-decoration: none; }
.pl-breadcrumbs a:hover { text-decoration: underline; }

/* =========================================================
   QUIZ PAGE
   ========================================================= */
.quiz-page { padding-bottom: 80px; }
.quiz-intro { padding: 32px 0 24px; max-width: 70ch; }
.quiz-summary { color: var(--ink-90); font-size: 1.05rem; }
.quiz-meta { list-style: none; display: flex; gap: 18px; flex-wrap: wrap; padding: 0; margin: 18px 0 0; font-size: 0.85rem; font-weight: 600; color: var(--ink-90); }
.quiz-meta li::before { content: '•'; margin-right: 8px; color: var(--maple); }
.quiz-meta li:first-child::before { content: ''; margin: 0; }

.quiz-app { max-width: 680px; margin: 0 auto; }
.quiz-card { background: var(--white); border: 1px solid var(--ink-10); border-radius: 10px; padding: 36px; box-shadow: var(--shadow-card); }
.start-card { text-align: center; }
.start-card p { font-size: 1.05rem; color: var(--ink-90); margin-bottom: 24px; }

.progress-track { background: var(--ink-10); height: 8px; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { background: var(--maple); height: 100%; width: 0%; transition: width 0.3s ease; }
.progress-label { font-size: 0.82rem; font-weight: 600; color: var(--ink-90); opacity: 0.7; margin-bottom: 20px; }

.question-text { font-size: 1.35rem; margin-bottom: 24px; }
.options-list { display: grid; gap: 12px; }
.option-btn {
	text-align: left; font-family: var(--font-body); font-size: 1rem; font-weight: 500;
	padding: 15px 18px; border-radius: var(--radius); border: 2px solid var(--ink-10); background: var(--paper);
	color: var(--ink); cursor: pointer; transition: border-color 0.12s ease, background 0.12s ease;
}
.option-btn:hover:not(:disabled) { border-color: var(--maple); }
.option-btn:disabled { cursor: default; }
.option-btn.is-correct { border-color: var(--green); background: rgba(63,107,74,0.1); font-weight: 700; }
.option-btn.is-incorrect { border-color: var(--maple); background: rgba(161,61,47,0.08); }

.feedback-box { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--ink-10); }
.feedback-verdict { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin-bottom: 6px; }
.feedback-verdict.is-correct { color: var(--green); }
.feedback-verdict.is-incorrect { color: var(--maple); }
.feedback-explanation { color: var(--ink-90); margin-bottom: 20px; }

.results-card { text-align: center; }
.stamp-result { display: flex; justify-content: center; margin-bottom: 12px; color: var(--ink-20); }
.stamp-result.stamp-pass { color: var(--green); }
.stamp-result.stamp-fail { color: var(--maple); }
.results-actions { display: flex; gap: 14px; justify-content: center; margin: 26px 0; flex-wrap: wrap; }

.review-list { text-align: left; margin-top: 32px; border-top: 1px solid var(--ink-10); padding-top: 24px; display: grid; gap: 18px; }
.review-item { background: var(--paper); border-radius: var(--radius); padding: 16px 18px; }
.review-q { font-weight: 700; margin-bottom: 8px; }
.review-wrong { color: var(--maple); margin: 0 0 4px; font-size: 0.92rem; }
.review-right { color: var(--green); margin: 0 0 8px; font-size: 0.92rem; }
.review-explain { color: var(--ink-90); font-size: 0.92rem; margin: 0; }

.quiz-article-content { max-width: 70ch; margin: 56px auto 0; color: var(--ink-90); }

/* =========================================================
   GENERIC PAGE CONTENT (About, FAQs, How to Apply, Practice hub, Blog)
   ========================================================= */
.page-content { padding: 32px 0 80px; }
.page-header { max-width: 70ch; margin-bottom: 40px; }
.page-lede { font-size: 1.1rem; color: var(--ink-90); }
.entry-content { max-width: 70ch; color: var(--ink-90); font-size: 1.05rem; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 22px; }

.faq-list-full { max-width: 78ch; }

.page-cta { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--ink-10); }

.chapter-section { margin-bottom: 48px; }
.chapter-section h2 { display: flex; align-items: center; gap: 12px; font-size: 1.25rem; margin-bottom: 18px; }
.chapter-section .chapter-num { font-family: var(--font-body); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--maple); color: var(--white); padding: 4px 10px; border-radius: 20px; }

.quiz-link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.quiz-link-card {
	display: flex; justify-content: space-between; align-items: center; gap: 10px;
	background: var(--white); border: 1px solid var(--ink-10); border-radius: var(--radius);
	padding: 14px 16px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem;
	transition: border-color 0.12s ease;
}
.quiz-link-card:hover { border-color: var(--maple); }
.quiz-link-meta { font-size: 0.75rem; font-weight: 700; color: var(--maple); flex-shrink: 0; }

.blog-list { display: grid; gap: 24px; max-width: 70ch; }
.blog-card { border-bottom: 1px solid var(--ink-10); padding-bottom: 24px; }
.blog-card h2 { margin-bottom: 8px; }
.blog-card a { text-decoration: none; color: var(--ink); }
.quiz-empty { max-width: 60ch; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--ink); color: var(--paper); margin-top: 80px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 56px 24px 32px; }
.footer-brand p { opacity: 0.7; font-size: 0.9rem; max-width: 32ch; }
.site-footer h3 { color: var(--paper); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--font-body); font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--paper); opacity: 0.75; text-decoration: none; font-size: 0.92rem; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 20px 24px; font-size: 0.82rem; opacity: 0.6; }

@media (max-width: 760px) {
	.footer-inner { grid-template-columns: 1fr 1fr; }
}
