/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: #EDE8DC; color: #1A1814; -webkit-font-smoothing: antialiased; }

/* ─── Layout ─── */
.app { display: flex; height: 100vh; overflow: hidden; }

/* ─── Sidebar ─── */
.sidebar {
  width: 52px;
  background: #0E0D0A;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  flex-shrink: 0;
  height: 100vh;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.sidebar-bottom {
  padding-top: 12px;
  border-top: 0.5px solid rgba(255,255,255,0.07);
  width: 100%;
  display: flex;
  justify-content: center;
}
.nav-item {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: rgba(255,255,255,0.22);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: rgba(244,239,230,0.6); }
.nav-item.active { background: rgba(255,255,255,0.1); color: rgba(244,239,230,0.9); }

/* ─── Main ─── */
.main { flex: 1; overflow-y: auto; }

/* ─── Pages ─── */
.page { display: none; }
.page.active { display: block; }
.page-inner { padding: 44px 56px 60px; min-height: 100vh; }

/* ─── Page header ─── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.page-title {
  font-family: 'Lora', serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -1.2px;
  color: #1A1814;
}
.page-title em {
  font-style: italic;
  color: rgba(26,24,20,0.28);
}
.page-desc {
  font-size: 11px;
  color: rgba(26,24,20,0.38);
  max-width: 190px;
  line-height: 1.8;
  text-align: right;
  margin-top: 8px;
}

/* ─── Divider ─── */
.section-divider {
  border: none;
  border-top: 1px dotted rgba(26,24,20,0.16);
  margin: 24px 0 28px;
}

/* ─── Chart section ─── */
.chart-section { margin-bottom: 0; }
.chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.chart-subject {
  font-size: 13px;
  font-weight: 400;
  color: #1A1814;
}
.chart-pill {
  font-size: 10px;
  color: rgba(26,24,20,0.4);
  border: 0.5px solid rgba(26,24,20,0.18);
  padding: 5px 14px;
  border-radius: 20px;
}
.chart-wrap {
  display: flex;
  height: 300px;
}
.y-axis {
  width: 28px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 2px;
}
.y-axis span {
  font-size: 9px;
  color: rgba(26,24,20,0.28);
  text-align: right;
  display: block;
}
.chart-body {
  flex: 1;
  position: relative;
}
.heatmap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hm-row {
  display: flex;
  flex: 1;
  gap: 2px;
}
.hm-cell {
  flex: 1;
  border-radius: 1px;
}
.line-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* ─── X axis ─── */
.x-axis { margin-left: 28px; }
.x-months {
  display: flex;
  margin-top: 6px;
}
.x-months span {
  flex: 1;
  font-size: 8px;
  color: rgba(26,24,20,0.28);
  text-align: center;
}
.x-years {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}
.x-years span {
  font-size: 10px;
  color: rgba(26,24,20,0.4);
  font-weight: 500;
}

/* ─── Bottom section ─── */
.bottom-section {
  height: 380px;
  margin-top: 48px;
}

/* ─── Empty state ─── */
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  font-size: 13px;
  color: rgba(26,24,20,0.3);
}
