:root {
  --color-bg: #fafaf8;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #555;
  --color-accent: #1e3a5f;
  --color-accent-light: #e8eef4;
  --color-border: #e0ddd8;
  --color-highlight: #c9a227;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 820px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-serif);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  font-size: 18px;
}

/* Header */
header {
  background: var(--color-accent);
  color: white;
  padding: 3rem 2rem 2.5rem;
  text-align: center;
}

header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  max-width: 700px;
  margin: 0 auto 0.5rem;
}

header .subtitle {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 400;
  opacity: 0.85;
  letter-spacing: 0.02em;
}

header a {
  color: white;
  text-decoration: none;
}

header a:hover {
  opacity: 0.9;
}

/* Navigation */
nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

nav .nav-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  justify-content: center;
  align-items: center;
}

nav a {
  font-family: var(--font-sans);
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
  white-space: nowrap;
}

nav a:hover,
nav a.active {
  border-bottom-color: var(--color-accent);
}

nav a.active {
  font-weight: 600;
}

nav .nav-sep {
  color: var(--color-border);
  font-size: 0.7rem;
  user-select: none;
}

/* Main content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Page title (for inner pages) */
.page-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-highlight);
}

/* Sections */
section {
  margin-bottom: 2.5rem;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-highlight);
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 2rem 0 0.75rem;
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: 1.5rem 0 0.5rem;
}

h5 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: 1.25rem 0 0.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Blockquotes */
blockquote {
  border-left: 3px solid var(--color-highlight);
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--color-accent-light);
  border-radius: 0 6px 6px 0;
  font-style: italic;
}

blockquote cite, blockquote .attribution {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* Ordered/unordered lists */
ol, ul {
  margin: 0.75rem 0 1rem 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

/* Stat callout */
.stat {
  display: inline-block;
  background: var(--color-accent-light);
  padding: 0.15em 0.5em;
  border-radius: 4px;
  font-weight: 600;
  color: var(--color-accent);
}

/* Recommendation page header */
.rec-header {
  background: var(--color-accent);
  color: white;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  margin: 0 0 2rem;
  text-align: center;
}

.rec-header .rec-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  display: block;
  margin-bottom: 0.25rem;
}

.rec-header h1 {
  color: white;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
}

/* Page navigation (prev/next) */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  gap: 1rem;
}

.page-nav a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.page-nav a:hover {
  opacity: 0.7;
}

.page-nav .prev::before {
  content: "\2190\00a0";
}

.page-nav .next::after {
  content: "\00a0\2192";
}

.page-nav .spacer {
  flex: 1;
}

/* Recommendation cards (summary page) */
.rec-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rec-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.1);
}

.rec-card-number {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  background: var(--color-accent);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.rec-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: 0 0 0.35rem;
}

.rec-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0;
}

/* PDF download link */
.pdf-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s;
}

.pdf-download:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent);
}

/* Landing page styles */
.landing-hero {
  text-align: center;
  padding: 4rem 2rem 3rem;
  background: var(--color-accent);
  color: white;
}

.landing-hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  max-width: 700px;
  margin: 0 auto 0.75rem;
}

.landing-hero .subtitle {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 400;
  opacity: 0.85;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.landing-hero .tagline {
  font-size: 1.1rem;
  opacity: 0.7;
  margin-top: 1rem;
  font-style: italic;
}

/* Table of contents */
.toc {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

.toc h2 {
  text-align: center;
  border: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li {
  margin: 0;
  border-bottom: 1px solid var(--color-border);
}

.toc-list li:first-child {
  border-top: 1px solid var(--color-border);
}

.toc-list a {
  display: flex;
  align-items: center;
  padding: 1rem 0.5rem;
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.15s, padding-left 0.15s;
  border-radius: 4px;
}

.toc-list a:hover {
  background: var(--color-accent-light);
  padding-left: 1rem;
}

.toc-list .toc-number {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-light);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.toc-list .toc-rec {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: white;
  background: var(--color-accent);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  margin-right: 1rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.toc-list .toc-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.toc-list .toc-desc {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-top: 0.15rem;
}

.toc-section-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
  margin: 2rem 0 0.5rem 0.5rem;
}

/* Footer */
footer {
  background: var(--color-accent);
  color: white;
  text-align: center;
  padding: 1.5rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  opacity: 0.9;
}

footer a {
  color: white;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 640px) {
  .landing-hero h1 { font-size: 1.85rem; }
  .landing-hero { padding: 2.5rem 1.25rem 2rem; }
  header h1 { font-size: 1.6rem; }
  header { padding: 2rem 1.25rem 1.5rem; }
  body { font-size: 16px; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }
  .page-title { font-size: 1.5rem; }
  nav a { font-size: 0.7rem; }
  nav .nav-sep { display: none; }
  .rec-header { padding: 1rem 1.25rem; }
  .rec-header h1 { font-size: 1.3rem; }
  .page-nav { flex-direction: column; text-align: center; }
  .toc-list .toc-rec { font-size: 0.6rem; padding: 0.15rem 0.4rem; }
}
