
:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-main: #ffffff;
  --bg-card: #f8fafc;
  --border: #e2e8f0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--text-main);
  background-color: #f1f5f9;
  line-height: 1.7;
  font-size: 16px;
}
header.site-header {
  background: #0f172a;
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.site-title a {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}
.site-subtitle {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}
.header-links a {
  color: #f8fafc;
  text-decoration: none;
  font-size: 0.9rem;
  margin-left: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  transition: background 0.2s;
}
.header-links a:hover {
  background: rgba(255,255,255,0.2);
}
.page-wrapper {
  max-width: 1200px;
  margin: 2rem auto;
  display: flex;
  gap: 2rem;
  padding: 0 1rem;
}
aside.sidebar {
  width: 320px;
  flex-shrink: 0;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  height: calc(100vh - 100px);
  position: sticky;
  top: 80px;
  overflow-y: auto;
}
aside.sidebar h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e0f2fe;
}
aside.sidebar ol {
  list-style: none;
  font-size: 0.88rem;
}
aside.sidebar li {
  margin-bottom: 0.4rem;
}
aside.sidebar a {
  color: #334155;
  text-decoration: none;
  display: block;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}
aside.sidebar a:hover {
  background: #f0f9ff;
  color: var(--primary);
}
aside.sidebar a.active {
  background: #0284c7;
  color: white;
  font-weight: 600;
}
main.content-area {
  flex-grow: 1;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem;
  min-width: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
main.content-area h1 {
  font-size: 2.1rem;
  color: #0f172a;
  margin-bottom: 1.25rem;
  line-height: 1.25;
  border-bottom: 3px solid #0284c7;
  padding-bottom: 0.5rem;
}
main.content-area h2 {
  font-size: 1.4rem;
  color: #0369a1;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
main.content-area h3 {
  font-size: 1.1rem;
  color: #334155;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
main.content-area p {
  margin-bottom: 1.15rem;
  color: #334155;
}
main.content-area ul, main.content-area ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
main.content-area li {
  margin-bottom: 0.35rem;
}
.part-header {
  background-color: #f0f9ff;
  border-left: 5px solid #0284c7;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.part-num {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0284c7;
  letter-spacing: 1px;
}
.part-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
}
.box-takeaways {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0ea5e9;
  padding: 1.25rem;
  margin: 1.5rem 0;
  border-radius: 6px;
}
.box-takeaways h4 { color: #0369a1; text-transform: uppercase; font-size: 0.95rem; margin-bottom: 0.5rem; }
.box-mistakes {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid #f97316;
  padding: 1.25rem;
  margin: 1.5rem 0;
  border-radius: 6px;
}
.box-mistakes h4 { color: #c2410c; text-transform: uppercase; font-size: 0.95rem; margin-bottom: 0.5rem; }
.box-actions {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #16a34a;
  padding: 1.25rem;
  margin: 1.5rem 0;
  border-radius: 6px;
}
.box-actions h4 { color: #15803d; text-transform: uppercase; font-size: 0.95rem; margin-bottom: 0.5rem; }
.box-quiz {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-left: 4px solid #9333ea;
  padding: 1.25rem;
  margin: 1.5rem 0;
  border-radius: 6px;
}
.box-quiz h4 { color: #7e22ce; text-transform: uppercase; font-size: 0.95rem; margin-bottom: 0.5rem; }
.box-diagram {
  background: #f8fafc;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: center;
}
.box-diagram-title { font-weight: 700; color: #0f172a; margin-bottom: 0.4rem; }
.box-diagram-desc { font-style: italic; color: #475569; font-size: 0.95rem; }
.case-study {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.case-study-badge {
  background: #0f172a;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 0.75rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;
}
th, td {
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  text-align: left;
}
th { background: #0f172a; color: white; }
tr:nth-child(even) { background: #f8fafc; }
code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: monospace;
}
.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.nav-buttons a {
  text-decoration: none;
  color: white;
  background: #0284c7;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.nav-buttons a:hover {
  background: #0369a1;
}
.nav-buttons a.secondary {
  background: #64748b;
}
.nav-buttons a.secondary:hover {
  background: #475569;
}
@media (max-width: 900px) {
  .page-wrapper { flex-direction: column; }
  aside.sidebar { width: 100%; height: auto; position: static; }
}
