/* ---- Professional Font Update ---- */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Merriweather:wght@700&display=swap');

:root {
  --bg: #e3f2fd;
  --text: #111827;
  --muted: #6b7280;
  --brand: #1E88E5;
  --border: #e5e7eb;
  --maxw: 980px;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0
}

/* Body now uses IBM Plex Sans with sensible fallbacks */
body {
  font-family: 'IBM Plex Sans', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1rem
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #cfe0f3;
  border-bottom: 1px solid var(--border)
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px
}

.brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem
}

.nav-list a {
  color: var(--muted);
  text-decoration: none
}

.nav-list a:hover {
  color: var(--brand)
}

main {
  padding: 2rem 0
}

/* Headings: Use Merriweather for a refined typographic hierarchy */
h1,
h2,
h3 {
  font-family: 'Merriweather', Georgia, serif;
  color: var(--text)
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.75rem
}

h2 {
  font-size: 1.5rem;
  margin-top: 2rem
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem
}

.lead {
  color: var(--muted);
  font-size: 1.05rem
}

p {
  margin: 0.75rem 0
}

ul {
  padding-left: 1.25rem
}

figure {
  margin: 1.25rem 0
}

figure img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: 10px
}

.toc {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: #cfe0f3;
  margin: 1rem 0
}

.toc ul {
  columns: 2;
  -webkit-columns: 2;
  -moz-columns: 2
}

.table {
  overflow-x: auto
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.5rem;
  text-align: left
}

th {
  background: #cfe0f3
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  margin-top: 3rem;
  color: var(--muted)
}

.placeholder .img-ph {
  height: 160px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted)
}

@media (max-width:700px) {
  .nav-list {
    display: none
  }

  .toc ul {
    columns: 1
  }
}