
:root {
  --bg: #eff4fb;
  --card: #ffffff;
  --ink: #102038;
  --muted: #5d6b82;
  --line: #dbe3f0;
  --accent: #2667ff;
  --accent-soft: #eaf1ff;
  --shadow: 0 18px 40px rgba(16,32,56,0.08);
  --blog-bg: #0f1c33;
  --blog-card: #132543;
  --blog-line: rgba(255,255,255,0.1);
  --blog-ink: #edf4ff;
  --blog-muted: #b9c7de;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef3fb 100%);
  color: var(--ink);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.app-shell { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 28px 22px; border-right: 1px solid var(--line); background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  display: flex; flex-direction: column;
}
.sidebar-header { margin-bottom: 22px; display: flex; justify-content: center; }
.sidebar-logo {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; width: 100%;
}
.sidebar-logo img {
  display: block; max-width: 154px; width: 100%; height: auto;
}
.sidebar-section { margin-bottom: 18px; }
.sidebar-section h2 {
  margin: 0 0 10px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: #567;
}
.sidebar-spacer { flex: 1; }
.sidebar-footer {
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; justify-content: center; align-items: center;
}
.sidebar-footer img {
  display: block; max-width: 180px; width: 100%; height: auto;
}
.sidebar-blog {
  margin-top: 22px; padding: 16px; border-radius: 22px; background: linear-gradient(180deg, var(--blog-bg), #162b4f);
  box-shadow: var(--shadow);
}
.sidebar-blog h2 { color: var(--blog-ink); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; color: #567; font-weight: 700; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list li { margin-bottom: 8px; }
.nav-list a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px; border-radius: 14px; color: var(--ink); background: transparent; border: 1px solid transparent;
}
.nav-primary a:hover, .nav-primary a.active { background: var(--accent-soft); border-color: #cfe0ff; text-decoration: none; }
.nav-blog a {
  color: var(--blog-ink); background: rgba(255,255,255,0.03); border-color: transparent;
}
.nav-blog a:hover, .nav-blog a.active { background: rgba(255,255,255,0.09); border-color: var(--blog-line); text-decoration: none; }
.nav-list small, .empty-state { color: var(--muted); }
.nav-blog small, .nav-blog .empty-state { color: var(--blog-muted); }
.content { padding: 36px; }
.hero {
  background: radial-gradient(circle at top left, #d9e8ff, #ffffff 55%);
  border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 28px; padding: 40px; margin-bottom: 24px;
}
.banner-hero {
  min-height: 260px; display: flex; align-items: end;
  background: linear-gradient(135deg, #0f4d3a 0%, #16634b 50%, #2a7a5f 100%);
  color: white;
}
.banner-hero .eyebrow, .banner-hero .study-subtitle { color: rgba(255,255,255,0.92); }
.hero h1 { margin: 8px 0 14px; font-size: clamp(2.7rem, 6vw, 4.8rem); line-height: 0.98; }
.study-subtitle { font-size: 1.25rem; line-height: 1.6; max-width: 60rem; margin: 0; }
.lead { font-size: 1.1rem; line-height: 1.7; color: #28405f; max-width: 60rem; }
.content-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); margin-bottom: 24px;
}
.section-heading { margin-bottom: 12px; }
.section-heading h2 { margin: 0 0 6px; }
.section-heading p { margin: 0; color: var(--muted); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.post-card { border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: #fbfdff; }
.post-card h2, .post-card h3 { margin: 4px 0 8px; }
.post-date, .muted { color: var(--muted); }
.blog-post h1, .blog-post h2, .content-card h1, .content-card h2, .content-card h3 { line-height: 1.2; }
.recent-list { margin: 0; padding: 0; list-style: none; }
.recent-list li { margin: 12px 0; }
.recent-list a {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  box-shadow: 0 10px 24px rgba(16,32,56,0.06);
  color: var(--ink); font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.recent-list a:hover {
  text-decoration: none; transform: translateY(-1px);
  border-color: #bfd3ff; background: linear-gradient(180deg, #ffffff 0%, #edf4ff 100%);
  box-shadow: 0 14px 28px rgba(16,32,56,0.1);
}
.recent-list a span { display: block; }
.recent-list time {
  color: var(--muted); white-space: nowrap; font-size: 0.95rem; font-weight: 500;
  background: #eef4ff; padding: 6px 10px; border-radius: 999px;
}
.markdown-module h1 { margin-top: 0; }
.markdown-module h2 { scroll-margin-top: 24px; }
.inline-image {
  max-width: 200px; width: 100%; height: auto; display: block;
  border-radius: 18px; object-fit: cover;
}
.table-wrap {
  width: 100%; overflow-x: auto; margin: 1rem 0;
}
.table-wrap table {
  width: 100%; border-collapse: collapse; min-width: 760px;
}
.table-wrap th, .table-wrap td {
  border: 1px solid var(--line); padding: 14px; text-align: left; vertical-align: top;
}
.table-wrap th {
  background: #eef4ff; font-weight: 700;
}
.table-wrap tr:nth-child(even) td {
  background: #fbfdff;
}
.table-wrap p:first-child { margin-top: 0; }
.table-wrap p:last-child { margin-bottom: 0; }
code { background: #eff4fb; padding: 2px 7px; border-radius: 8px; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .content { padding: 18px; }
  .hero { padding: 28px; }
  .recent-list a { flex-direction: column; align-items: flex-start; }
}
